Home » Htaccess Tools » Questions regarding htaccess » I ask to help with my problem htaccess
I ask to help with my problem htaccess [message #425] Sun, 11 June 2006 20:14 Go to next message
Mingan
Messages: 3
Registered: June 2006
Location: UA
I ask to help with my problem htaccess

At my site of three address:

sitedomen.com

sitedomen.org.ru

sitedomen.org.ua

Well historically so has developed

There is a problem{task} - it is necessary that anyone www. threw on 301 redirect on the corresponding domain without www.

That is:

http://www.sitedomen.com on sitedomen.com

http://www.sitedomen.org.ua On sitedomen.org.ua

Thus the additional condition that sitedomen.org.ru is necessary also and http://www.sitedomen.org.ru threw on sitedomen.org.ua

Such code htaccess

RewriteEngine On
RewriteBase/
RewriteCond % {HTTP_HOST}! ^sitedomen.com $
RewriteRule ^ http: // sitedomen.com % {REQUEST_URI} [R=301, L]


Successfully consults with all all both with www and without www in one address sitedomen.com

Help to finish this code please

In general I have written chaotically, but I hope have stated more less clearly Smile
I ask to help with my problem htaccess [message #436] Sun, 18 June 2006 10:54 Go to previous message
andreas  is currently offline andreas
Messages: 239
Registered: January 2005
Location: Denmark

Site Admin
Im not sorry I understand, but I assume you want surfers accessing the domain with www. to the domain without www.

[code]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.sitedomen.com$
RewriteRule (.*) http://sitedomen.com$1 [R=301, L]

RewriteCond %{HTTP_HOST} ^www.sitedomen.org.ua$
RewriteRule (.*) http://sitedomen.org.ua$1 [R=301, L]
[code]

[/code]
Previous Topic:Redirection by ip ?
Next Topic:Block all files except one css
Goto Forum:
  


Current Time: Fri May 16 17:27:34 CEST 2008

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software