Redirect to a Different URL using .htaccess

A straight forward redirection using .htaccess. Note that the domain name should be omitted from From address and it should always be there in To address, even if the redirection is on same server.

[code]<IfModule mod_rewrite.c>
RewriteEngine On
redirect 301 FromAddress ToAddress
</IfModule>[/code]

For example

[code]<IfModule mod_rewrite.c>
RewriteEngine On
redirect 301 /home/11-articles-news/967-himachali-version-of-kolaveri-di-by-aadarsh-rathore.html http://www.jogindernagar.com/home/himachali-version-of-kolavari-d-by-adarsh-rathore
</IfModule>[/code]

Leave a Reply

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