Hey all,
Well I have this issue with my htaccess url rewriting.
I wanted my web app to hide the php extension and at the same time get rid of dynamic URLs, converting them to static using mod_rewrite.
I studied a few options available, first one I tried was:
Options +FollowSymLinks
RewriteEngine on
RewriteRule profile-(.*)\.htm$ profile.php?id=$1
which would redirect
http://mysite.com/profile-1.htm to
profile.php?id=1 That one works amazing, however, I kinda like the directory type of rewriting, like this:
Options +FollowSymLinks
RewriteEngine on
RewriteRule profile/(.*) profile.php?id=$1
That one would redirect
http://mysite.com/profile/1 to
http://mysite.com/profile.php?id=1 That one works too. However, I notice that when I reach any profile page, it loads ok but you can see at the status bar that the browser is somehow on a loop waiting and transferring from the website really fast. This happens for like 6 seconds and then it says done. But with the first type of rewriting (the htm method) the page loads instantly and it says done almost instantly as well.
I want to know what is wrong with my htaccess for the directory type of rewriting, what can I do to solve this? I sure don't want to use the htm method, I don't like the way URL looks, so I rather not use any rewriting at all if I can't use the directory rewriting method.
Please help!