Jump to content

Mod works on 1 server not another


cooldude832

Recommended Posts

I've used this mod in some sense before

Options +FollowSymLinks
Options +Indexes 
RewriteEngine on


RewriteCond %{SCRIPT_FILENAME} !=/www/phpnet/cpanel.php [NC]
RewriteCond %{SCRIPT_FILENAME} !=/www/phpnet/index.php [NC]
RewriteRule ^(.+)\.php$ /phpnet/index.php?Page_Request=$1&request=1 [QSA,L]     

 

Which basically lets me filter all php documents into my index page which phrases them and produces the content desired or throws a 404 if its an invalid page.

 

It worked fine on my remote server and now bringing it into my local uniform server setup I have problems.

As it is written it will cause an infinite rewrite loop.  Taking the /www off the conditions caues the same loop issue.

 

writing it as

Options +FollowSymLinks
Options +Indexes 
RewriteEngine on


RewriteCond %{SCRIPT_FILENAME} !=phpnet/cpanel.php [NC] 
RewriteCond %{SCRIPT_FILENAME} !=phpnet/index.php [NC]
RewriteRule ^(.+)\.php$ phpnet/index.php?Page_Request=$1&request=1 [QSA,L]     

 

will make it load index.php on all php request (and not fail on index) however I can not get to my cpanel.php page (its a page I wish to have not be phrased)

 

Link to comment
https://forums.phpfreaks.com/topic/120034-mod-works-on-1-server-not-another/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.