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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.