Currently when I remap my friendly to non-friendly URLs on my website, I normally use lines like these in my .htaccess:
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} !^$
RewriteRule .* - [L]
RewriteRule ^afolder/subfolder/(.*)$ /internal.php?Q1=$1 [L]
RewriteRule ^afolder2/subfolder2/(.*)$ /internal.php?Q2=$1 [L]
....
RewriteRule ^something/else/(.*)$ /internal.php?Qn=$1 [L]
As you can see, I'm remapping http://example.com/whatever/whatever/value
to http://example.com/internal.php?Q(something)=value
.
The point I'm making is that with every RewriteRule statement, I'm used to starting the search with a caret and ending it with a dollar sign, even for the simplest rules. For example to map http://example.com/anything
to http://example.com/something.php
, I use:
RewriteRule ^anything$ /something.php [L]
My question is, when could I get away with NOT using carets or dollar signs to remap my URLs?
I'm asking because I want to boost the overall speed of my website, and every millisecond I shave off of processing time makes clients happier, (P.S. I need to shave off about 12ms loading time from the other end of North America then I'll meet the needs of google) and if I can remove those carets and/or dollar signs, then I feel I'll get a boost since the mod_rewrite engine will have a simpler string to process.