In this post, I want to explain how to redirect the subdomain to a subfolder with .htaccess. I had implemented this for demos.arjunphp.com,lab.arjunphp.com and downloads.arjunphp.com I hope it is useful for you.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
RewriteEngine On RewriteCond %{HTTP_HOST} ^demos\.arjunphp\.com$ RewriteCond %{REQUEST_URI} !^/demos/ RewriteRule (.*) /demos/$1 RewriteEngine On RewriteCond %{HTTP_HOST} ^lab\.arjunphp\.com$ RewriteCond %{REQUEST_URI} !^/lab/ RewriteRule (.*) /lab/$1 RewriteEngine On RewriteCond %{HTTP_HOST} ^downloads\.arjunphp\.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.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.
When i open http://democlub.in/admin Its work fine
But how to create http://seller.democlub.in
http://democlub.in/admin
ADMIN PANEL
http://seller.democlub.in
SELLER PANEL