the following virtual host definition is working for an arbitrary url starting with "*"

<VirtualHost *:80>
     ServerName www.domain.com
     DocumentRoot /home/user/www/application/current/public
     <Directory /home/user/www/application/current/public>
         Order allow,deny
         Allow from all

How to rewrite this configuration so that it is applied only for url's starting with "*"

I tried "ServerPath /user", but it doesn't work...

Any ideas?


2 Answers 2


Unfortunately, ServerPath is a legacy directive that is used to support HTTP/1.0 clients which don't support the Host: header. Therefore, an alternative is to have the primary vhost serve up a page with links using URL prefixes that Apache can use for routing.

For this legacy support mechanism to work, you need to disregard the Host header completely (since the browsers you need to support would not send one). So you can't use ServerName and ServerPath simultaneously.

I'd just use mod_rewrite to do what you want.


I'm sorry to say I can't answer your question directly but I am fascinated by it. I've been doing Apache support on various fora for 6 years and this is the first time I've seen a ServerPath question. What made you consider it?

It's such an old and disused feature that I suspect even ServerPath forgot ServerPath existed.