.htaccess - difference between RewriteRule ^(.*)$ & RewriteRule (.*)$ -


when moving pages old domain new domain, noticed people added ^and other not in rewriterule

what different between

rewriterule ^(.*)$ http://mynewdomain.com/$1 [r=301,l] 

and

rewriterule (.*)$ http://mynewdomain.com/$1 [r=301,l] 

thank you.

it better use start , end anchors (^ , $) wherever possible ^(.*)$ in 2 cases listed both rules behave similar.


Comments

Popular posts from this blog

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

ruby on rails - Authlogic - how to make a registration and don't log in the new account? -