Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 02:12 pm EDT

Geeklog Forums

Redirecting www.sample.com/index.html to www.sample.com to avoid duplication (.htaccess)


Sally G

Anonymous
If there is an index.html or index.htm or a variant of these files inside of the directory, the web server won't let you browse through directories. If I redirect “/index.html” to “/”, will this allow browsing of my website because it no longer has a page titled “/index.html” or does the page it is redirected to, i.e.,"www.sample.com/" still serve as the index page? In other words, will my site show directories as a result of this change to avoid duplicate content?
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
I don`t think you have a problem with
www.example.com
www.example.com/index.html

http://googlewebmastercentral.blogspot.com/2008/09/demystifying-duplicate-content-penalty.html
 Quote

Sally

Anonymous
confused
Thanks for the link about duplication of content. I'm concerned about the canonization aspect of /index.html and / being read as two sites for ranking.

I am hoping this .htaccess script will take care of this (only one domain):

RewriteCond %{THE_REQUEST} /index\.html\ HTTP/
RewriteRule ^index\.html$ / [R=301,L]
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
I think google is pretty clever :wink: and will see all of these as 1 site

www.example.com/
www.example.com/index.htm
www.example.com/index.html
www.example.com/index.php

example.com/
example.com/index.htm
example.com/index.html
example.com/index.php
 Quote

All times are EDT. The time is now 02:12 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content