I am trying to give each MOVIE there own url name, for example, www.helloworld.com/BATMAN. I have been using mod_rewrite to create such url. I have been using following htaccess code to achieve such result.
RewriteEngine ON
RewriteCond %(REQUEST_FILENAME) !-d
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-l
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
The mod_rewrite works perfectly. When A user enters randam movie name (name that does not exist in database), for example, www.helloworld.com/abcd, I have created a url redirect which is www.helloworld.com/oopsmovienotfound.php. This works fine too. But the problem I am having is this: When user click www.helloworld.com/login.php .The url keeps looping between login.php and oopsmovienotfound.php OR the url is forwarded to www.helloworld.com/oopsmovienotfound.php beacause database doesnot have "login.php" as a movie name. I thought this command
RewriteCond %(REQUEST_FILENAME) !-f
should have take care of this but its not. Please help. Thank you in advance.