Welcome Guest, Not a member yet? Register   Sign In
Help with .htaccess - Subdomain
#4

[eluser]Henry Weismann[/eluser]
So point your new subdomain to the folder that ci is in...ask your webhost how.

Then use the following in your htaccess:

Code:
RewriteEngine on
RewriteCond RewriteCond %{HTTP_HOST} ^categories.site.com$
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/search/category/$1 [L]

The above redirect will only run if the http host is the sub domain so everything from the normal part of the site will not be affected.

And in your config use a switch to set the base url to either the sub domain or the regular domain based on what is the current host in the request.

Thats the quick and dirty way.


Messages In This Thread
Help with .htaccess - Subdomain - by El Forum - 12-20-2008, 06:03 PM
Help with .htaccess - Subdomain - by El Forum - 12-21-2008, 11:40 PM
Help with .htaccess - Subdomain - by El Forum - 12-22-2008, 04:48 AM
Help with .htaccess - Subdomain - by El Forum - 12-22-2008, 11:39 AM
Help with .htaccess - Subdomain - by El Forum - 12-24-2008, 01:12 PM
Help with .htaccess - Subdomain - by El Forum - 07-16-2012, 11:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB