Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

htaccess Driving me Batty

  • 19-08-2011 04:49PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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