Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

htaccess Driving me Batty

Options
  • 19-08-2011 4:49pm
    #1
    Registered Users Posts: 5,238 ✭✭✭


    I want to redirect mysite.com/index.htm to mysite.com/home/index.htm which I succeeded in doing by:
    Redirect /index.htm http://mysite.com/home/index.htm

    The problem is that I've a subdomain blog.mysite.com which is also being redirected.

    Directory structure:
    /public_html/home
    /public_html/blog
    /public_html/.htaccess

    I want to redirect one file(/index.htm) and nothing else but try as I might it redirects everything or nothing.

    For the love of god help!
    Tagged:


Comments

  • Registered Users Posts: 912 ✭✭✭chakotha


    You could do it with PHP by replacing the contents of index.htm with

    [PHP]<?php
    header("HTTP/1.1 301 Moved Permanently");
    header("Location:http://mysite.com/home/index.htm");
    exit();
    ?> [/PHP]

    You'd have to make sure that .htm files are parsed by PHP.


Advertisement