Help! My .htaccess file has stopped working!

Discussion in 'Apache' started by LawnchairLarry, Nov 5, 2008.

  1. #1
    Friends,
    I have set up my .htaccess file on an Apache 1.3.34 server with several redirects and rewrites, but strangely it has stopped working and I haven't got a clue why. I would like to permanently redirect all visitors to the English homepage (en/index.htm) of the multilingual website, but I would like that page to be rewritten to en/. Something went wrong along the way and currently the English homepage is shown as the root directory (/ instead of /en/) and when you click on the link to the English homepage, you see an "index of" page. And there's an old index.html file with some backlinks that I would like to 301 redirect to en/ too. Strangely, the 301 redirect to the www version does still work. Here's what I've got:

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^mydomain.tld [NC]
    RewriteRule ^(.*)$ http://www.mydomain.tld/$1 [R=301,L]
    
    DirectoryIndex [COLOR="Red"]index.html[/COLOR] [COLOR="Blue"]en/[/COLOR][COLOR="Green"]index.htm[/COLOR]
    
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*[COLOR="Red"]index.html[/COLOR]\ HTTP/
    RewriteRule ^[COLOR="Red"]index.html[/COLOR] [COLOR="Blue"]en/[/COLOR]$1 [R=301,NC,L]
    
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*[COLOR="Green"]index.htm[/COLOR]\ HTTP/
    RewriteRule ^[COLOR="Blue"]en/[/COLOR][COLOR="Green"]index.htm[/COLOR] [COLOR="Blue"]en/[/COLOR]$1 [R=301,NC,L]
    
    ErrorDocument 404 http://www.mydomain.tld/error404.htm
    Code (markup):
    Can anyone help me out, please?

    Thanks!
     
    LawnchairLarry, Nov 5, 2008 IP
  2. yajur

    yajur Banned

    Messages:
    193
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    u have full root acess on ur server?
     
    yajur, Nov 25, 2008 IP