The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect on docroot also redirects subdomains

Discussion in 'General Discussion' started by gator, Apr 17, 2004.

  1. gator

    gator Active Member

    Joined:
    Feb 27, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    I have a redirect in the .htaccess file of the document root (/home/user/public_html/.htaccess) as follows:
    Code:
    Redirect temp /index.php [url]http://www.mydomain.com/subdir/index.php[/url]
    
    This works fine but this will also redirect all the subdomains to the same location. For example,

    forums.mydomain.com will also be redirected to http://www.mydomain.com/subdir/index.php

    which is not what I want to happen. I cannot change the document root in the http.conf file because of images coming from above this location and a PHP redirect works but it seems cleaner to redirect from the server and not the browser. Is there a solution that wont break my subdomains?

    Tks!
     
Loading...

Share This Page