1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

htaccess redirect to index.html not to / ?

Discussion in 'General Programming Chat' started by LukesDad, Jan 29, 2013.

  1. LukesDad

    LukesDad Junior Member

    Joined:
    Oct 24, 2009
    Messages:
    135
    Likes Received:
    71
    Location:
    Düsseldorf
    Home Page:
    Hi,
    I don't want visitors to land on domain.tld but on www.domain.tld/index.html
    In the moment I use this .htaccess:

    RewriteEngine on
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^[^.]*\.[^.]*$
    RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    Can anybody tell me how to modify the htaccess so that a visitor automatically gets to .../index.html and not to / ?
    Each time I try my luck, I crash the server :)