php - htaccess mod_rewrite, one syntax works, but other no -
when write in .htaccess mod_rewrite
rewriteengine on rewriterule ^(.*)\.my_extension$ $1.php
this wroks fine.
but when trying mod_rewrite this:
rewriteengine on rewriterule ^(.*)$ index.php?url=$1
this gives me internal server error
when open address, example site.com/somepage
so, may reason of this?
rewriteengine on rewritecond %{request_uri} !(index.php) rewriterule ^(.*)$ index.php?url=$1
you have redirect loop, need exclude index.php rules.