cooldude832 Posted August 17, 2008 Share Posted August 17, 2008 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) Quote Link to comment https://forums.phpfreaks.com/topic/120034-mod-works-on-1-server-not-another/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.