Jump to content

Advanced RewriteMap

thomasrjones's Photo
Posted Mar 24 2012 05:59 AM
1319 Views

Im looking to implement some dynamic mass virtual hosting through use of the RewriteMap functionality. Can someone provide some insight into the following goal?

http.conf
UseCanonicalName Off

Global RewriteEngine On

Global RewriteMap vhost-type-1

Global RewriteMap vhost-type-2

Global RewriteMap]vhost-type-3

Vhost *:80
ServerName vhost-type-1:%1

RewriteCond

RewriteRule

DocumentRoot vhost-type-1:%2


Vhost *:80
ServerName vhost-type-2:%1

RewriteCond

RewriteRule

RewriteCond

RewriteRule

DocumentRoot vhost-type-2:%2


Vhost *:80
ServerName vhost-type-3:%1

Local RewriteMap vhost-type-3-mapping

RewriteCond vhost-type-3-mapping:%2 vhost-type-3:%1

RewriteRule

DocumentRoot vhost-type-3:%2



Is this even possible?

0 Replies