Friendly htaccess

Discussion in 'Apache' started by Man2u2uk, Mar 27, 2008.

  1. #1
    Hi All,

    I am currently converting my large website from HTML to PHP.

    Currently all of my page extensions are .html

    The following code in my htaccess should block people from viewing any or my directorys and also parse my php page as html

    
    IndexIgnore *
    AddType application/x-httpd-php .htm .html
    HTML:
    Can someone please confirm that this does what i mentioned above.

    My problem is, will the above htaccess be seo friendly (i,e keep my pagerank and not affect my search engine listing)

    Thanks
     
    Man2u2uk, Mar 27, 2008 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Instead of IndexIgnore, use Options -Indexes

    The -Indexes turns off mod_autoindex without altering any of the other options. If you want to turn it on in a sub-directory you would use Options +Indexes in that directories htaccess.
     
    joebert, Mar 28, 2008 IP