Forwarding index.html to root domain

Discussion in 'Search Engine Optimization' started by jazzdrive3, Dec 7, 2007.

  1. #1
    To prevent duplicate content, I'd like to forward my domain.com/index.html to domain.com.

    How do you set up .htaccess file for this?

    Thanks!
     
    jazzdrive3, Dec 7, 2007 IP
  2. ForgottenCreature

    ForgottenCreature Notable Member

    Messages:
    7,473
    Likes Received:
    173
    Best Answers:
    0
    Trophy Points:
    260
    #2
    Why does it matter? If your index.html page isn't linked anywhere then you should be fine.
     
    ForgottenCreature, Dec 8, 2007 IP
  3. sweetfunny

    sweetfunny Banned

    Messages:
    5,743
    Likes Received:
    467
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sure, this should be a foolproof one. It will work regardless if your page in html, php or htm

    The last line will rewrite the index in your subfolders, so instead of domain.com/folder/index.html it will rewrite it to domain.com/folder/

    If you only want the homepage to rewrite, simply remove the last line. Also change the yourdomain to your actual URL.

     
    sweetfunny, Dec 8, 2007 IP
  4. jazzdrive3

    jazzdrive3 Well-Known Member

    Messages:
    122
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #4
    Thanks a lot! Just what I was asking for.
     
    jazzdrive3, Dec 8, 2007 IP