Forum Moderators: phranque
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^show$show.php [R]
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^show$ /show.php [L]
After intensive testing, I've come to the conclusion that this only happens when there is a file in the root that has a name that matches the regex and followed by .(anything), but not if it's name matches exactly the regex.
E.g. for my case
If there is a file named "show" in the root, the redirect/rewrite works fine.
If there is a file named "show.anything", the redirect/rewrite stops working and instead redirects me to the "Page not found" page.
If there are no files named either "show" or "show.(anything)" the redirects/rewrites work fine.
Another example:
RewriteRule ^abcd$ something
If there is a file named "abcd" in the root, the redirect/rewrite works fine.
If there is a file named "abcd.anything", the redirect/rewrite stops working and instead redirects me to the "Page not found" page.
If there are no files named either "abcd" or "abcd.(anything)" the redirects/rewrites work fine.
The exact same thing happens for Redirect and RedirectMatch.
It seems to me there is a problem in the way your server handles file names/extensions and it should be fixed.
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.skyslip\.com
RewriteRule ^(.*)$ http://www.skyslip.com/$1 [R=permanent,L]
RewriteRule ^inbox$show.php?page=messages_show [L]
RewriteRule ^upload$show.php?page=upload_pictures [L]
RewriteRule ^profile$show.php?page=user_show [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+[^/])$ $1/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/*(.+)/$ /get_user.php?user=$1 [L]