mod rewrite question
Hello,
Need some help rewriting from one subdomain to another that takes in account potentially old bookmarks from the old subdomain. I have a basic redirect like: RewriteCond %{HTTP_HOST} ^oldsub.domain\.com$ [NC] RewriteRule ^/(.*)$ http://newsub.domain\.com/$1 [R=301,L] Which works fine. But on the RewriteCond I'm trying to figure out a wildcard for users that may have bookmarked eg (oldsub.domain.com/forum/something.php?do=thread). So everything to the right of oldsub.domain.com/ erased, and redirected to the newsub.domain.com Any ideas? Would be much appreciated.. Thanks, Jim |
It looks like what you currently have would send the request http://oldsub.domain.com/example to http://newsub.domain.com/example, but you really want it to wipe anything after the domain name. Take out the $1, example below.
RewriteCond %{HTTP_HOST} ^oldsub.domain\.com$ [NC] RewriteRule ^/(.*)$ http://newsub.domain\.com [R=301,L] |
All times are GMT -5. The time now is 06:20 PM. |