apache redirect one domain to another site

Sometimes we need the redirection rule for your website. When you want to divert your website traffic to another site.

That is very easy to writing or putting the one site to another site redirection rule through apache.

apache redirect one domain to another site

You need to put entry in your virtual host section or if you are having shared hosting then open your .htaccess file and put following entry in that file

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

You just change newdomain.com to your new website name.

apache redirect one domain to another site

apache redirect one domain to another site

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *