Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Redirect on docroot also redirects subdomains

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

  1. gator

    gator Active Member

    Feb 27, 2003
    Likes Received:
    Trophy Points:
    I have a redirect in the .htaccess file of the document root (/home/user/public_html/.htaccess) as follows:
    Redirect temp /index.php [url][/url]
    This works fine but this will also redirect all the subdomains to the same location. For example, will also be redirected to

    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?


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice