I'd like to use that in my .htaccess # mod_rewrite in use Options +FollowSymlinks RewriteEngine On RewriteCond %{http_host} ^domain.com [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.(html?¦php)\ HTTP/ RewriteRule ^(([^/]*/)*)index\.(html?¦php)$ http://www\.domain\.com/$1 [R=301,L] Code (markup): The first part of domain.com to www.domain.com works fine (btw, Is that ok that the first part doesn't have the slashes before the dots of the url?), but now I'd like to add the second part because I have a large directory filled with pages that interlink to each other's index.html file, so with that second part I'd like to make every link go to directory/ instead of directory/index.html in order to avoid duplicates... Is this code correct and correctly inserted into the .htaccess file? Will it get the job done for all the pages if only inserted to the top-level domain? Thank in advance!
Look, then I'm not going to take the index.html out of my pages coz I got over 7,000 of them. Isn't that .htaccess script supposed to work!?
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^(.*)/(.*)$ http://www.domain.com/$1/ [R=301,L] might change domain.com/directory/anything to domain.com/directory/