Dynamic Subdomain with htaccess unchanged URL |
I have a Codeigniter project Located at "domain.com/users/abc" directory. I want to access it with Subdomain "abc.domain.com/" and also I don't want the url in the address bar to change.
There will be multiple Codeigniter projects at /var/www/html/users Directory. Each of the sub-directories needs to be accessed via "SubdirectoryName.domain.com". I have tried virtual hosts configured something like this in my .conf file Code: <VirtualHost *:80> This works fine when routing to the default codeigniter page. Other codeigniter routings do not work. Example, "subdomain.example.com/login" should go to "login" controller. Instead, it looks for a folder named "login" inside "subdomain" folder. What am I doing wrong? Both htaccess and apache configuration solutions will be appreciated. Thanks in Advance. |
Welcome Guest, Not a member yet? Register Sign In |