Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    [SOLVED] mod rewrite question


    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 ( So everything to the right of erased, and redirected to the

    Any ideas? Would be much appreciated..


  2. #2
    it could be
    RewriteCond %{SERVER_NAME} !^newsub\.domain\.com$
    RewriteRule --your rule

  3. #3
    Thanks for the reply, I got it done with this:

    RewriteCond %{HTTP_HOST} ^*)$ [NC]
    RewriteRule ^/(.*)$ [R,L]


  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts