Skip to main content
Redirecting the site using the htaccess

Redirecting the site using the htaccess

You can redirect your website to another by using RewriteRule in .htaccess.

For example:

If your website URL is example.eu, it can be redirected to another URL example.ch using htaccess.
If suppose your URL is example.eu/blog then the URL will be redirected to the same page.

The below rule have done this

RewriteCond %{HTTP_HOST} !^m\.
RewriteRule ^$ http://example.eh [R,L]