homepage Welcome to WebmasterWorld Guest from 54.198.130.203
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Search Engines / Sitemaps, Meta Data, and robots.txt
Forum Library, Charter, Moderators: goodroi

Sitemaps, Meta Data, and robots.txt Forum

    
index.html
redirect in htaccess file
anyone




msg:4015623
 3:05 pm on Oct 29, 2009 (gmt 0)

I think this is my first post here :)

Although G is smart enough to understand that www.mysite.com
is the same with mysite.com its still a good Idea to have a redirect like this on top of the htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.com
RewriteRule (.*) [mysite.com...] [R=301,L]

Should I do this for the /index.html version to the non /index.html version?

I see that google has the [google.com...]

but not the [google.com...] version.

Any thoughts on this?

Regards,
Radu

 

jdMorgan




msg:4015630
 3:23 pm on Oct 29, 2009 (gmt 0)

There are many threads with better-coded and more-complete Hostname and URL canonicalization solutions in our Apache Server forum [webmasterworld.com]. Also take a look at our Apache Forum Library.

Jim

anyone




msg:4015654
 3:53 pm on Oct 29, 2009 (gmt 0)

Thank you for the answer Morgan,

And sorry for the post :)

If anyone will have the same question as me, this is the answer:

RewriteCond %{THE_REQUEST} ^.*\/index\.html?
RewriteRule ^(.*)index\.html?$ [mysite.com...] [R=301,L]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Search Engines / Sitemaps, Meta Data, and robots.txt
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved