Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP and mod_rewrite problems on Plesk
    primarykey
    data
    text
    <p>I'm at my wits' end... I'm trying to do something simple, yet I can't understand what is going wrong...</p> <p>I'm simply trying to take all requests to the domain, and route them to index.php</p> <p>EDIT for clarity: index.php acts as a dispatcher for the request, as part of a framework.</p> <p>I've got this working on my local machine without problems, but on the server (VPS Linux with Plesk) I'm having all sorts of problems...</p> <p>EDIT for clarity: These rules are defined in the vhost.conf config file for the virtual host.</p> <p>Here's the mod_rewrite:</p> <pre><code>&lt;IfModule rewrite_module&gt; RewriteEngine On RewriteRule ^/.* /index.php &lt;/IfModule&gt; </code></pre> <p>Here's the apache error log when I attempt to go to "www.mydomain.com/home/index" (for example):</p> <pre><code>[debug] core.c(3072): [client xxx.xxx.xxx.xxx] r-&gt;uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/phppath/cgi_wrapper/home/index [debug] core.c(3078): [client xxx.xxx.xxx.xxx] redirected from r-&gt;uri = /phppath/cgi_wrapper/phppath/cgi_wrapper/home/index [debug] core.c(3078): [client xxx.xxx.xxx.xxx] redirected from r-&gt;uri = /phppath/cgi_wrapper/home/index [debug] core.c(3078): [client xxx.xxx.xxx.xxx] redirected from r-&gt;uri = /home/index </code></pre> <p>As you can see from the trace, it seems to redirect the /home/index to /phppath/cgi_wrapper/ which then seems to get passed on again to /phppath/cgi_wrapper/phppath/cgi_wrapper/home/index, and so on until the maximum internal redirects is reached. </p> <p>An HTTP 500 is sent to the browser.</p> <p>Further EDIT - extra information. From what I can make out from the way Plesk scatters its files about, these are the only two lines which have an effect on the virtual host. I think it's probably that Action statement... can I override it somehow in the vhost.conf?</p> <pre><code>in php-cgi.conf: ScriptAlias /phppath/ "/var/www/cgi-bin/cgi_wrapper/" Action php-script /phppath/cgi_wrapper in php.conf: AddHandler php5-script .php </code></pre> <p>Further EDIT: Found this within a dynamically generated conf file (at vhost level).</p> <pre><code>&lt;Files ~ (\.php)&gt; SetHandler None AddHandler php-script .php Options +ExecCGI allow from all &lt;/Files&gt; </code></pre> <p>Has anyone got any ideas as to what's happening? I've been pulling my hair our for two days... Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload