Redirect with .htaccess

A .htaccess (hypertext access) file is a directory-level configuration file that allows for decentralized management of web server configuration. Servers often use .htaccess to rewrite URLs.

Rewrite Hostname

RewriteEngine On

RewriteCond %{HTTP_HOST}  abc.com$ [NC]
RewriteRule (.*) http://xyz.com/$1 [R=301,L]

Comments

comments