What is the difference between %1
and $1
in .htaccess?
For example,
# to remove www
RewriteCond %{HTTP_HOST} ^(\w+)\.mydomain\.com [NC]
RewriteRule .* http://mydomain.com/%1 [R=301,L]
# versus
# RewriteRule .* http://mydomain.com/$1 [R=301,L]
I have been using Dave Child's .htaccess cheat sheet and Jackol's .htaccess cheat sheet as well as the Apache mod_rewrite docs but additional help would be great.