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

Powerfull XFileSharing version

Moderator: admin

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

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: 1800
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
Contact:

#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


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests