Welcome to WebmasterWorld Guest from 23.22.220.37

Forum Moderators: goodroi

Message Too Old, No Replies

index.html

redirect in htaccess file

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

New User

5+ Year Member

joined:Feb 10, 2009
posts: 5
votes: 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

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

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 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

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

New User

5+ Year Member

joined:Feb 10, 2009
posts: 5
votes: 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]

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members