Forum Moderators: phranque
RewriteCond %{THE_REQUEST} \.php
RewriteRule \.php - [G]
I am just installed it on a different server and it appears the server is not recognizing the difference between a sub-request and an original.
Using the above generates a 'Gone' error every time a php page is internally requested, huh?
Could this be a configuration issue or does it have to be something silly I am missing?
Justin
RewriteCond %{THE_REQUEST} \.php
RewriteRule \.php - [G]
RewriteRule ^Sitemap$ /htm-files/sitemap.php [L]
RewriteRule ^Contact$ /htm-files/contact.php [L]
I use this series of code on other servers often.
The original request (%{THE_REQUEST}) should be for:
http://www.example.com/Sitemap
The secondary request (!%{THE_REQUEST}) should be for:
http://www.example.com/htm-files/sitemap.php
Justin
However, if another rule or a script generates an external redirect, then that will be a new HTTP request.
But since you've got this running on other servers, I'm thinking there might be a proxy involved -- That your requests to "your" server are actually proxied to one of a number of back-end servers, and there's something not quite right about that proxy setup, which should be invisible to you... Just a guess.
Jim
I appreciate the help from both of you.
It seems a bit odd, so I am guessing jdMorgan is on to something... This is on a new host (to me), so hopefully I can get it resolved.
I disallowed the directories the files are coming from to prevent duplication, but would like to get it worked out so it functions properly.
Justin