/ Published in: Apache
I like using HTTP_HOST with a simple regex so it'll work in multiple environments, ie stage, production, dev, etc.
Expand |
Embed | Plain Text
RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
You need to login to post a comment.
