Hi all
we've just migrated from one CMS to another and the URLs are all different (yes I know that some people frown on this, but I have to make do with what's in front of me).
However, I have a database table that maps the old URL to the new ones, so I set the Apache error document to a perl script that will look up the mapping and redirect to the new url.
However, it's ocurred to me that I don't know how to get the requested address in my perl script. Dumping the %ENV hash only shows the error document script. Is there a way to get the original request? (mod_perl isn't an option, I'm afraid, otherwise I'd just intercept the request and do the translation before Apache would raise the not found error)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.