Possible Duplicate:
Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask?
I want to redirect http://www.name.com and http://name.com/ to http://my.name.com/.
Examples http://www.name.com/ goes to http://my.name.com http://name.com/ goes to http://my.name.com http://www.name.com/picture.jpg no redirect http://name.com/folder/picture.jpg no redirect
Thanks.
^/$- it must be an *exact* match, with the start and end of the string directing preceding and following the slash. Within a<Directory>or.htaccesscontext, the directory path is stripped, so a request forhttp://name.com/comes in tomod_rewrite's match process as an empty string, which is exactly what^$will match in the second and third examples. – Shane Madden Oct 25 '12 at 01:27