Codeigniter subdomain and mod_rewrite problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Codeigniter subdomain and mod_rewrite problem (/showthread.php?tid=33946) |
Codeigniter subdomain and mod_rewrite problem - El Forum - 09-14-2010 [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 Codeigniter subdomain and mod_rewrite problem - El Forum - 10-26-2010 [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? Codeigniter subdomain and mod_rewrite problem - El Forum - 08-14-2012 [eluser]Bigil Michael[/eluser] I have the same issue. did u solved this problem??? |