.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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -