Page is a not externally linkable
- Google
-- Google SEO News and Discussion
---- /directory/ and /directory/index.html are duplicate content?


jdMorgan - 1:40 am on Aug 21, 2008 (gmt 0)


No, that will loop, because REQUEST_URI and the URL-path seen by RewriteRule *will* be updated when the DirectoryIndex directive is applied.

On Apache, in example.com/.htaccess:

# Parse .html and .inc files for server-side includes
AddHandler server-parsed .html .inc
#
# Declare custom 404 error document
ErrorDocument 404 /404.html
#
# Set up to enable mod_rewrite
Options +FollowSymlinks
RewriteEngine on
#
# Redirect index.html in any directory to directory index "/"
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*index\.html
RewriteRule ^(([^/]+/)*)index\.html$ http://example.com/$1 [R=301,L]
#
# Redirect non-canonical "www" domain variants to example.com
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]

Jim


Thread source:: http://www.webmasterworld.com/google/3726529.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com