.htaccess method for directing a user?
Posted: Wed Sep 27, 2006 12:22 pm
I thought since I'm trying to do the following in a directory containing s9y I'd ask this question here.
I have a domain "laserscoop" that goes to dragonseye.com that I'd like redirected to a particular category in my blog if the user didn't ask for a particular topic or category. IE, if they only put in http://www.laserscoop.com and not http://www.laserscoop.com/archive/blahdeblah or some such I'd like to send them to a particular category.
At the moment I've got code to direct users to the main blog page all the time but am not quite sure how to set it up so they go to a particular category if they don't specify a page in their browser. Can anyone help?
Here's what I've got in my root .htaccess. (I've left my s9y .htaccess alone)
#
# redirect any requests for http://www.laserscoop.com/* to /blog
#
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.laserscoop\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/blog/ [NC]
RewriteRule ^(.*)$ /blog/$1 [NC,L]
My "normal" blog is at http://www.dragonseye.com/blog
I have a domain "laserscoop" that goes to dragonseye.com that I'd like redirected to a particular category in my blog if the user didn't ask for a particular topic or category. IE, if they only put in http://www.laserscoop.com and not http://www.laserscoop.com/archive/blahdeblah or some such I'd like to send them to a particular category.
At the moment I've got code to direct users to the main blog page all the time but am not quite sure how to set it up so they go to a particular category if they don't specify a page in their browser. Can anyone help?
Here's what I've got in my root .htaccess. (I've left my s9y .htaccess alone)
#
# redirect any requests for http://www.laserscoop.com/* to /blog
#
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.laserscoop\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/blog/ [NC]
RewriteRule ^(.*)$ /blog/$1 [NC,L]
My "normal" blog is at http://www.dragonseye.com/blog