Results 1 to 3 of 3
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$ ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-18-2008 #1
[SOLVED] 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
- 10-22-2008 #2Just Joined!
- Join Date
- Oct 2008
- Posts
- 21
it could be
RewriteCond %{SERVER_NAME} !^newsub\.domain\.com$
RewriteRule --your rule
- 10-30-2008 #3
Thanks for the reply, I got it done with this:
RewriteCond %{HTTP_HOST} ^oldsub.domain.com(.*)$ [NC]
RewriteRule ^/(.*)$ http://newsub.domain.com/ [R,L]
Jim



