httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Haddon <...@greenleaftech.net>
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"
content="5;URL=---VARIABLE---">

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
mailto:tom@greenleaftech.net
m +1.415.871.4180
www.greenleaftech.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message