Category : apache

I’m currently trying to achieve this using .htaccess http://example.com – using public_html folder http://example.com/places – using the places folder This is the current structure of my folders and also both public_html and places folder are a wordpress site root |-public_html |-places | |-.htaccess |-.htaccess root/.htaccess RewriteEngine on RewriteCond ${HTTP_HOST} ^example.com$ [NC,OR] RewriteCond ${HTTP_HOST} ^www.example.com$ RewriteCond ..

Read more

i am trying to open a .php file from .html file. it will always appeared the whole raw php coding instead of the actual website. my coding is : <a href="localhostonlineexaminationstart.php" style="float:right">Student</a> I also tried changing the .html file into .php and it also did not work. I also did put something like this <a ..

Read more

What would be the best way to redirect different domains hosted on the same server to a corresponding uri? Example: http://domain1.com to http://domain1.com/index.php/domain1/index http://domain2.com to http://domain2.com/index.php/domain2/index http://domain3.com to http://domain3.com/index.php/domain3/index Virtual hosts are not an option since I don’t have a DocumentRoot /var/www/vhosts/site1/ or Directory /var/www/vhosts/site1/ The httpd.conf is minimal since everything is handled via php ..

Read more

I’am using EventSource like this: let evtSource = new EventSource(‘polling.php?ts=’+ts’, { withCredentials: true }); This works well. Later I’am using a fetch: button.addEventListener(‘click’, (e) => { fetch(‘src/desks.php’, { mode: ‘same-origin’, credentials: ‘same-origin’, method: ‘POST’, body: JSON.stringify( app.desire ), headers: { ‘x-csrf-token’: document.head.querySelector(‘meta[name="csrf-token"]’).content, "Content-Type": "application/json", "Accept": "application/json" } }) .then(response => { … The fetch works ..

Read more