.htaccess not working, please advise

Discussion in 'Apache' started by sirisaacnewton2007, Apr 27, 2006.

  1. #1
    My goal is to redirect /index.html to / with the .htaccess file
    I found the following code and added it to the front of my existing .htaccess file:

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
    RewriteRule ^(.*)index\.html$ /$1 [R=301,L]

    This has had no effect. I have a linux based account with registerfly, plesk control panel, and apache server. This is the full text of the file below. Please give me some advice. Thanks.


    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
    RewriteRule ^(.*)index\.html$ /$1 [R=301,L]

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*


    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName proe-design.com
    AuthUserFile /home/httpd/vhosts/proe-design.com/httpdocs/_vti_pvt/service.pwd
    AuthGroupFile /home/httpd/vhosts/proe-design.com/httpdocs/_vti_pvt/service.grp
     
    sirisaacnewton2007, Apr 27, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this instead:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ 
    RewriteRule ^index\.html$ http://www.domain.com/ [R=301,L] 
    Code (markup):
     
    mad4, Apr 27, 2006 IP
  3. sirisaacnewton2007

    sirisaacnewton2007 Peon

    Messages:
    165
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    seems to be working perfectly now thanks
     
    sirisaacnewton2007, Apr 27, 2006 IP
  4. sirisaacnewton2007

    sirisaacnewton2007 Peon

    Messages:
    165
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    OK I'm totally retarded. It was actually working the first time. I thought I uploaded the .htaccess to my test site. I had actually done it to my real site. Thats why the test site wasn't responding. Both codes actually work.
     
    sirisaacnewton2007, Apr 27, 2006 IP
  5. theblight

    theblight Peon

    Messages:
    246
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You need to relax a bit ;)
     
    theblight, Apr 29, 2006 IP