.htaccess Rewrite index.php back to directory where index.php is located -
i have directory of localhost/testing/pages/index.php
how redirect user localhost/testing/pages/ whenever enter localhost/testing/pages/index.php index.php extension?
i have tried use this:
rewriteengine on rewrite %{request_filename} !-f rewriterule ^([^\.]+)$ $1.php [nc] but not work.
thanks!
try:
rewritecond %{the_request} ^[a-z]{3,9}\ /(.*)index\.php rewriterule ^ /%1 [l,r=301]
Comments
Post a Comment