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.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -