In this post, I want to explain how to redirect the subdomain to a subfolder with .htaccess. I had implemented this for demos.gravitywebapps.com, lab.gravitywebapps.com and downloads.gravitywebapps.com I hope it is useful for you.
RewriteEngine On RewriteCond %{HTTP_HOST} ^demos\.gravitywebapps\.com$ RewriteCond %{REQUEST_URI} !^/demos/ RewriteRule (.*) /demos/$1 RewriteEngine On RewriteCond %{HTTP_HOST} ^lab\.gravitywebapps\.com$ RewriteCond %{REQUEST_URI} !^/lab/ RewriteRule (.*) /lab/$1 RewriteEngine On RewriteCond %{HTTP_HOST} ^downloads\.gravitywebapps\.com$ RewriteCond %{REQUEST_URI} !^/downloads/ RewriteRule (.*) /downloads/$1 |
That’s it.
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
Gravity Web Apps headquartered in Delhi, India, is a sophisticated and Hi-Fi computerized advertising organization that is a skill in the field of innovative Website / CRM / ERP/, Designing with software Development, advance and classic Digital Marketing, Search Engine Optimization (SEO) and Brand building furthermore, Applications advancement.
Copyright © 2013, Gravity web apps All Rights Reserved.
Share This Blog