I have the following code in my .htaccess:
Every part of this works correctly, except the first rule:
For URLs matching that rule, it looks like nginx never passes the request to Apache and returns 404.
If I open nginx.conf for the domain, I find the following code:
Commenting this code out makes everything work like it's supposed to. However, this is not a good long-term solution, because the file is automatically generated.
Any idea as to how I can resolve this issue?
(I have "Smart static files processing" turned off in Plesk)
Code:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !/blog/
RewriteCond %{REQUEST_URI} !/sendmail/
RewriteRule ^(.*)/$ /cgi-bin/adm/constructor.pl?d=$1 [T=application/x-httpd-cgi,L]
RewriteCond %{REQUEST_URI} !/blog/
RewriteCond %{REQUEST_URI} !/sendmail/
RewriteRule ^(.*)/index\.html$ /cgi-bin/adm/constructor.pl?d=$1 [T=application/x-httpd-cgi,L]
RewriteCond %{REQUEST_URI} !/blog/
RewriteCond %{REQUEST_URI} !/sendmail/
RewriteRule ^(.*)/index_(.+)\.html$ /cgi-bin/adm/constructor.pl?d=$1&l=$2 [T=application/x-httpd-cgi,L]
RewriteCond %{REQUEST_URI} !/blog/
RewriteCond %{REQUEST_URI} !/sendmail/
RewriteRule ^(.*)/(.*)\.html$ /cgi-bin/adm/constructor.pl?d=$1&p=$2 [T=application/x-httpd-cgi,L]
Every part of this works correctly, except the first rule:
Code:
RewriteCond %{REQUEST_URI} !/blog/
RewriteCond %{REQUEST_URI} !/sendmail/
RewriteRule ^(.*)/$ /cgi-bin/adm/constructor.pl?d=$1 [T=application/x-httpd-cgi,L]
For URLs matching that rule, it looks like nginx never passes the request to Apache and returns 404.
If I open nginx.conf for the domain, I find the following code:
Code:
location ~ /$ {
index "index.html" "index.cgi" "index.pl" "index.php" "index.xhtml" "index.htm" "index.shtml";
}
Commenting this code out makes everything work like it's supposed to. However, this is not a good long-term solution, because the file is automatically generated.
Any idea as to how I can resolve this issue?
(I have "Smart static files processing" turned off in Plesk)