I’m a little stuck with with my .htaccess redirect.
It was working find while I was with PHP4 but the recent move to a new host with PHP5 have changed things for which I’ve no clue.
I’m working on a URL shortening service. Here, for a URL like http://example.com/e72b0f, it gives me http://example.com/forward.php?e72b0f
Earlier with my .htaccess file, the “forward.php?” was masked (hidden). How can I bring back this behavior. Here is the .htaccess for your reference.
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} \/([0-9a-z]{6})$ [NC]
RewriteRule ^(.*) http://example.com/forward.php?%1 [L]
Btw, I also do not rule out the issue being in the PHP Script. The developer that did it for me is too busy to look at it.
If you rewrite to an
http://URL that the server doesn’t think is in the site,mod_rewritewill do a redirect instead of just a rewrite. In order to see if this is happening, make a page that has nothing in it butand see if says it’s going to “nsfw.in”.
Either way, you should be able to strip off the
http:// nsfw.infrom the beginning of the URL and just rewrite it to/forward.php?%1. You may need to add a PT flag in order for it to be interpreted as a URL and not a FS path.