.htaccess and subdomain- need some quick help

Discussion in 'Site & Server Administration' started by bigpapa, Dec 10, 2008.

  1. #1
    I have a subdomain, folder.mysite.com and I want ALL requests for the domain to go to the subdomain. In my .htaccess file in my root folder, I have:

    RewriteEngine On   
    RewriteBase /   
    
    RewriteCond %{REQUEST_URI} !^/folder.mysite.com 
    RewriteRule ^(.*)$ http://folder.mysite.com/ [R=307,L]  
    HTML:
    This does the job EXCEPT if someone types in mysite.com/folder.

    How do I force a redirect if someone types in mysite.com/folder to folder.mysite.com?

    Thanks for any help.
     
    bigpapa, Dec 10, 2008 IP
  2. masked

    masked Active Member

    Messages:
    322
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #2
    I guess you can manage redirection from cpanel , try it there.
     
    masked, Dec 10, 2008 IP