Forum Moderators: phranque

Message Too Old, No Replies

http://www. to http://

301 redirect

         

mnm_pistha

3:32 am on Jun 23, 2006 (gmt 0)

10+ Year Member



i am very sure the solution for this question is already there in the board but i have been searching, searching cant locate it.

I have the modrewrite code to redirect all [site.com...] requests to [site.com....] it goes like this

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

will somebody be kind enough to post the modrewrite rule to do just the inverse. Ie 301 redirect all [site.com...] requests to [site.com....] I will be thankful

jdMorgan

3:36 am on Jun 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Simply swap the "www" from the first and second lines.

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim