Home / Web Development / Redirect subdomain to main domain htaccess

Redirect subdomain to main domain htaccess

Hi friends,
Try adding this to an appropriate place in your .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^prittytimes\.com$ [NC] RewriteRule ^ http://prittytimes.com/webcrased [L,R]

As long as the requested host is prittytimes\.com, the rule will be applied. With the regex match set to ^, any URI will match and the target will be redirected to http://prittytimes.com/webcrased



If you want only specific URI requests to be redirected to /webcrased, you can tweak the ^ to something appropriate.

Loading Facebook Comments ...
Social Media Auto Publish Powered By : XYZScripts.com