Hi,
I want to redirect all requests from ex-ample.com to example.com. The url structure should remain the same, I only want to "replace" the "-" in domain...
http://www.ex-ample.com/asdf123
redirects to:
http://www.example.com/asdf123
thanks!
Hi,
I want to redirect all requests from ex-ample.com to example.com. The url structure should remain the same, I only want to "replace" the "-" in domain...
http://www.ex-ample.com/asdf123
redirects to:
http://www.example.com/asdf123
thanks!
If it’s just a single hyphen:
RewriteCond %{HTTP_HOST} ^([^-]+)-([^-]+)$
RewriteRule ^ http://%1%2%{REQUEST_URI} [L,R]