.htaccess DirectoryIndex and RedirectPermanent fails

Discussion in 'Apache' started by tsrwebman, Jan 14, 2007.

  1. #1
    I have recently changed my website from .html to .php based
    I want http://www.telfordsteamrailway.co.uk to erve up the index.php file. It insists in serving the index.shtml file.
    I also want to serve up personalised error pages. Previously I had no .htaccess file, relying on the service providers default.
    So I put the following .htaccess file in the root

    # <-- This goes in the PUBLIC root -->

    # <-- Hide the contents of the .htaccess file from prying eyes -->

    <FilesMatch ^\.ht.*>
    order deny,allow
    deny from all
    </Files>

    # <-- Custom Error Pages -->

    ErrorDocument 401 /error_docs/unauthorised.html
    ErrorDocument 403 /error_docs/forbidden.html
    ErrorDocument 404 /error_docs/not_found.html
    ErrorDocument 500 /error_docs/internal_server_error.html

    #set default as php
    DirectoryIndex index.php
    RedirectPermanent /index.shtml http://www.telfordsteamrailway.co.uk/index.php

    The server now serves up the error pages, but still serves index.shtml
    (which has a 7 second re-direct to index.php in the meta's)
    Whilst this works, I dont want google analising index.shtml as my page rank will suffer.

    Any ideas?

    help appreciated.

    Allan
     
    tsrwebman, Jan 14, 2007 IP
  2. tsrwebman

    tsrwebman Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Seems to work now with no changes, just 30mins delay in taking effect

    Strange

    Allan
     
    tsrwebman, Jan 14, 2007 IP