ScriptAlias and RewriteRule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux