Reputation: 1
I have this code on my website so all the www request will be transferred to non www.
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule (.*) http://%1/$1 [R=301,L]
It's working perfectly BUT I also want to include ANY page requested to the non www.
for example :
http://www.puaction.com/sitemap.xml
will be redirected to :
http://puaction.com/sitemap.xml
so any page requested will be redirected to non www
Thanks in advance ! :)
Upvotes: 0
Views: 91
Reputation: 65
Try this : RewriteRule ^(.*) http://yourdomaine.com/$1 [QSA,L,R=301]
Upvotes: 1