httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Haddon <>
Subject [users@httpd] ScriptAlias and RewriteRule
Date Fri, 27 Jul 2007 18:57:02 GMT
Hi Folks,

I'm trying to set up one site to redirect to another while preserving
the path, and just changing the domain name, but with an intermediary
page that includes a message explaining why. I believe that the best way
for me to do that is as follows:

- Redirect from source site to intermediary page
- Include meta refresh of, say 5 seconds on intermediary page
- Make intermediary page a cgi script that captures the request_uri and
writes that to the <META http-equiv="refresh"

I'm having some problems setting this up. Whenever I turn on the
redirect, it won't find the cgi script that I've defined as a
scriptalias, even though without the redirect it finds it fine.

ScriptAlias /+redirect_to_another /path/to/cgi-bin/redirect_to_another.cgi
ReWriteEngine on
RewriteCond %{REQUEST_URI} !^/+redirect_to_another
RewriteRule "/(.*)" "/+redirect_to_another" [L]

I originally tried it without the RewriteCond, but it doesn't work
either with or without. In both cases I get 404 errors...

Any ideas what I'm missing?

Thanks, Tom

Tom Haddon
m +1.415.871.4180

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message