.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

php - cannot display multiple markers in google maps v3 from traceroute result -

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

javascript - firefox memory leak -