Forum Moderators: phranque
Given this directory structure:
../
../widgets/
../widgets/.htaccess
../widgets/faq.php
With the .htaccess shown having these contents:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /widgets
RewriteRule ^faq/([0-9]+)\.html$ /widgets/faq.php?category=widgets&article=$1 [L]
RewriteRule ^faq/$ /widgets/faq.php?category=widgets [L]
And with faq.php containing:
<?php
print_r($_GET);
?>
On my test server, any request for /widget/faq/123.html appears to be passed directly to faq.php without any processing my mod_rewrite. The GET array is empty. If I change the name of faq.php to faq_script.php (and the names of that file in the .htaccess to faq_script.php) then everything works as expected. Using faq.php on my production server also works as expected. :/
Of course, my two servers are very different from each other (yeah, I know...), so it's not as simple as doing a quick comparison of a few varying settings. :(
It appears almost as though there is a "interpret directory names as script names" directive that takes precedence over mod_rewrite... Any ideas where to look next?