1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

htaccess help

Discussion in 'HTML, Graphics & Programming' started by Joobs, 25 Feb 2010.

  1. Joobs


    Joined: 25 Oct 2002

    Posts: 488

    Location: Brighton


    I have a website where the root of the site (example.com) gets redirected to a sub directory (example.com/v2). This is the code i am using:

    RedirectMatch ^/$ http://example.com/v2/
    However, i how have some subdomains i wish to use. The files for these are located in http://example.com/subdomains/domain1. And cpanel is setup so you access domain1.example.com. However, if i go to domain1.example.com it is still forwarding me to example.com/v2. if i go to domain1.example.com/index.html it works correctly and displays the html file of the subdomain. Also if i remove the redirectMatch rule domain1.example.com works correctly.

    Can anyone suggest what i need to do to get this working?