www.webdeveloper.com
Results 1 to 2 of 2

Thread: .htacess rewrite help please.

Threaded View

  1. #1
    Join Date
    May 2009
    Posts
    100

    .htacess rewrite help please.

    I'm using a rewrite to direct whole root domain to another domain.

    Though I use some rules to stop a subdomain from being redirected also.

    One problem I'm having is setting this to stop 2 subdomains from redirecting rather than just one. Here is the code I'm using.

    Code:
    Options +FollowSymLinks 
    RewriteEngine on
    
    # Stop pro
    rewriteCond %{HTTP_HOST} ^forum\.mydomain.com$
    rewriteRule .* - [L] 
    
    #skip if
    
    rewriteCond %{HTTP_HOST} ^forum\.mydomain.com$
    rewriteRule .* - [S=2] 
    
    #continue pro
    RewriteCond %{HTTP_HOST} ^www.mydomain.com$
    RewriteRule ^(.*)$ "http\:\/\/www\.my new domain\.com\/$1" [R=301,nc]
    What do I need to add to stop another 2 subdomains redirecting called themes.mydomain.com & wp.mydomain.com?

    Thanks all.
    Last edited by Nerdygeek; 05-19-2010 at 11:37 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles