Codeigniter subdomain and mod_rewrite problem |
[eluser]koichirose[/eluser]
Hi, I googled around a lot and couldn't find a working solution for my problem. I have this perfectly working controller(s): www.website.com/admin www.website.com/admin/add Now I would like to setup a subdomain: admin.website.com (goes to www.website.com/admin) admin.website.com/add (www.website.com/admin/add) etc. I managed to do it by putting an 'A' record in my hosting's dns config: admin.website.com -> server_ip_address Then I have this virtual host among others (public_html is where the CodeIgniter index.php file is): Code: <VirtualHost *:80> And this is my .htaccess. Most of it is codeigniter default stuff, I added the lines where it says ^admin.website.com$: Code: RewriteEngine on This works: I get redirected to www.website.com/admin when I type in admin.website.com. The problem is that I get redirected: I would like the url to be admin.website.com instead of changing to www.website.com/admin. Could someone point me in the right direction? Thanks
[eluser]Unknown[/eluser]
I have the same problem: I would like that subdomain.domain.com/func will be redirected to the controller "subdomain" function "func" (e.g. www.domain.com/subdomain/func) but the URL in the address bar should remain subdomain.domain.com. Do you have a solution?
[eluser]Bigil Michael[/eluser]
I have the same issue. did u solved this problem??? |
Welcome Guest, Not a member yet? Register Sign In |