[thelist] Mod Rewrite

RLivsey R.Livsey at cache-22.co.uk
Fri Aug 22 09:43:25 CDT 2003


Jackson Yee wrote:

> I haven't seen RewriteRule used to match domain names rather than path 
> information before, so that might be what your issue is.
> 
> You can also use the RewriteLog and RewriteLogLevel directives to get a better 
> idea of what is happening as you make each request.

Thanks, that got me on the right track and it's working now.

Heres what I ended up with:

### start mod rewrite
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^domain\.com$
RewriteRule (.*) /mainsite/$1 [L]
### end mod rewrite

For some reason whenever I enable logging, I got 500 server errors.
Not sure why, will dig through the Apache error logs at some point to 
track that down, but it's not urgent any more :o)

Thanks again for the help.

-- 
R.Livsey
Incutio Web Developer
[ PHP | Perl | Java | C# ]
www.cache-22.co.uk
www.incutio.com



More information about the thelist mailing list