virtual subdomain with htaccess |
[eluser]harmstra[/eluser]
I try to create a virtual subdomain, but no workie workie. When i put this in htaccess, Code: RewriteCond %{HTTP_HOST} ^subdomain[NC] things work fine. test is a physical subdir, and the contents of /test/index.html show up when i point the browser to subdomain.domain.com. Important: the addressbar keeps the subdomain.domain.com, while it shows www.domain.com/test/index.html So far, so good. Now i want to do the same thing, but redirect to a CI controller Code: RewriteCond %{HTTP_HOST} ^subdomain[NC] Then i get a Internal Server Error, because of a redirect loop. So i add 1 line. Code: RewriteCond %{HTTP_HOST} ^subdomain[NC] Then everything works fine, subdomain.domain.com shows the contents of www.domain.com/controllername. But the annoying thing is, the url in the address bar changes to www.domain.com/controllername Is there a way to avoid this? |
Messages In This Thread |
virtual subdomain with htaccess - by El Forum - 04-23-2009, 09:08 AM
virtual subdomain with htaccess - by El Forum - 04-23-2009, 09:12 AM
virtual subdomain with htaccess - by El Forum - 04-23-2009, 09:46 AM
virtual subdomain with htaccess - by El Forum - 04-23-2009, 10:03 AM
virtual subdomain with htaccess - by El Forum - 04-23-2009, 10:43 AM
virtual subdomain with htaccess - by El Forum - 04-23-2009, 11:35 AM
virtual subdomain with htaccess - by El Forum - 04-23-2009, 12:09 PM
virtual subdomain with htaccess - by El Forum - 04-23-2009, 01:18 PM
virtual subdomain with htaccess - by El Forum - 04-26-2009, 08:44 AM
virtual subdomain with htaccess - by El Forum - 04-26-2009, 09:28 AM
virtual subdomain with htaccess - by El Forum - 04-26-2009, 11:19 AM
virtual subdomain with htaccess - by El Forum - 04-29-2009, 04:26 AM
virtual subdomain with htaccess - by El Forum - 04-29-2009, 04:44 AM
virtual subdomain with htaccess - by El Forum - 04-29-2009, 05:05 AM
virtual subdomain with htaccess - by El Forum - 04-29-2009, 05:20 AM
virtual subdomain with htaccess - by El Forum - 04-29-2009, 07:39 AM
|