[svlug] Apache 1.3 and redirecting a virtual domain to a web page?

Vince Hoang svlug at az0.altern8.net
Fri Oct 25 20:42:15 PDT 2002

On Thu, Oct 24, 2002 at 10:43:17PM -0700, Daevid Vincent wrote:
> I've tried to use:
> RedirectPermanent http://mp3.daevid.com         http://daevid.com/mp3
> RedirectPermanent http://resume.daevid.com
> http://daevid.com/resume.shtml

The syntax appears to map a path to an URL, not an URL to an URL.
Here are examples from the Apache docs:
    Redirect /service http://foo2.bar.com/service
    Redirect permanent /one http://example.com/two
    Redirect 303 /two http://example.com/other

You might want to experiment with mod_rewrite in your default
virtual host. I am used to rewriting from paths with mod_rewrite,
but not the actual HTTP_POST. The following rule will not work,
but it may get you closer to what you want to do.

  RewriteRule ^([^.]+)\.daevid\.com(.*) http://daevid.com/$1$2 [L,R]

My last suggestion is to have a script in your default virtual
host redirect you to the proper path. This could be simple CGI
script or full blown handler.


More information about the svlug mailing list