.htaccess - How to force htaccess to index.php if no file or parameters specified -
i want if user enters site url without specifying file or parameters site.com or site.com/ , should redirected site.com/index.php if enter file site.com/somefile.php or give parameters site.com/?param=val , htaccess should not , let run.
in .htaccess, add line:
directoryindex index.php
this way apache index.php
requests yoursite.com & yoursite.com/. there no need add rewrite condition rule! plus, servers don't allow rewrite conditions.
in wamp, rewrite disabled default.
Comments
Post a Comment