PDA

View Full Version : Domain name mapping - variables in url


jasonv
12th December 2008, 22:19
Suppose there is an application running in some host - hostserver.com. Domain name www.domain.com maps to hostserver.com. Is it possible to have different domains which map to the same host server through the same application, passing variables via the url?

E.g.
www.productA.com -> www.domain.com/productA and
www.productB.com -> www.domain.com/productB where
/productA and /productB are in fact ?query=productA and productB using mod_rewrite, and not directories.

falko
13th December 2008, 19:13
Yes, should be possible using mod_rewrite: http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html