XFileSharing Pro - How to redirect www to non www with mod rewrite

Message
Author
xplan
Posts: 23
Joined: Jul 30, 2010 5:33 am

How to redirect www to non www with mod rewrite

#1 Postby xplan » Jun 02, 2011 6:57 am

i try to put some code

Code: Select all

RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
it dose not work

admin
Site Admin
Posts: 1839
Joined: Mar 22, 2006 12:32 pm

#2 Postby admin » Jun 02, 2011 9:17 am

Not sure why you need that in xfilesharing, as it always will redirect to domain name which you have in config file. So, if you have "yoursite.com" in config (and in license), then it will redirect there, even user will type www.yoursite.com in browser.

xplan
Posts: 23
Joined: Jul 30, 2010 5:33 am

#3 Postby xplan » Jun 03, 2011 3:27 am

Thank for your advice

but i found it

must to put that code

at thie first line after

Code: Select all

RewriteEngine On