subdomains with servlets

Using a single web hosting account to host multiple sites

subdomains with servlets

Postby kris928 » Wed Mar 02, 2005 7:45 pm

I have many virtual hosts configured but I would like a rewrite rule that forwards any requests to a particular host internally to a new url that a java servlet understands.

http://somedomain/pages/anything.html => http://somedomain/11/pages/anything.html

I may also need to do...

http://somedomain/pages/anything.html => http://anotherdomain/11/pages/anything.html

but I need the first of these to do it before I pass the request on to my servlet connector (mod_jk).

I can get it to work with redirects but I can not figure out how to do it internally??

Thanks!
kris928
 
Posts: 1
Joined: Wed Mar 02, 2005 7:41 pm

Postby seomike » Wed Mar 02, 2005 8:29 pm

#this rule will cover the first issue you're having
RewriteRule ^([^/]+)/([^/]+)\.html$ /11/$1/$2.html [L]

as per the second one hmmm I'm going to have to look that one up just to be safe :)
seomike
 
Posts: 331
Joined: Thu May 06, 2004 7:36 pm
Location: Dallas


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 96 guests

cron