Our server would resolve both of these addresses to the same resource:
- Code: Select all
http://host.exapmle.example2.com
http://www.example.example2.com
Over the years, both of these URL's have been used interchangeably, and so there are lots of hard coded links to both scattered all over the place.
But now, as part of a overall site redesign, we want to get all our url's consistent. Which brings me to Mod_Rewrite.
I thought it would be as simple as using a RewriteRule to to take any address with "host" in it, capture everything that follows it, and then append it all onto "www".
The best I can figure, it would be something like this:
- Code: Select all
RewriteRule ^host\.(.*)$ www$1 [L]
But that doesn't do the job, so it obviously isn't.
If I can get over this niggling little issue, then I'll have time to play with mod_rewrite and see what I can really do... but for now, I just need some help with this little thing.
Thanks,
-B