Swifty
2012-07-04 14:08:39 UTC
I've been informed that one of my hosts will have its IP name changed
on the 31st July. I already have the new IP name, which resolves to
the same IP address, so it's easy to put in a redirect now.
I'd like to redirect to a temporary page on the server's NEW IP name,
and there run a CGI script informing the user of what is happening,
and actions that they must take (update bookmarks, get page with
doomed URL fixed, etc).
Handling the redirect to the CGI script is simple, but arranging for
the script to have access to the original URI is a little trickier.
I could use a RedirectMatch directive, and capture the original URI in
a regex variable, then construct the target URL so it redirects to
something like:
http:new.server/cgi-bin/new_ip_name.cgi?original_uri
I think (without actually trying it) that my redirectmatch should be
something like this (in old.server virtualhost definition):
RedirectMatch (.*) http://new.server/cgi-bin/new_ip_name.cgi?$1
This seems a workable solution. Is there anything obviously easier?
on the 31st July. I already have the new IP name, which resolves to
the same IP address, so it's easy to put in a redirect now.
I'd like to redirect to a temporary page on the server's NEW IP name,
and there run a CGI script informing the user of what is happening,
and actions that they must take (update bookmarks, get page with
doomed URL fixed, etc).
Handling the redirect to the CGI script is simple, but arranging for
the script to have access to the original URI is a little trickier.
I could use a RedirectMatch directive, and capture the original URI in
a regex variable, then construct the target URL so it redirects to
something like:
http:new.server/cgi-bin/new_ip_name.cgi?original_uri
I think (without actually trying it) that my redirectmatch should be
something like this (in old.server virtualhost definition):
RedirectMatch (.*) http://new.server/cgi-bin/new_ip_name.cgi?$1
This seems a workable solution. Is there anything obviously easier?
--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk