Redirector 1.1
RedirectorCopyright � 1999 Alexander Staubo. Extended 1999 Dylan Jay.
ANY USE BY YOU OF THE SOFTWARE IS AT YOUR OWN RISK. THE SOFTWARE IS PROVIDED FOR USE "AS IS" WITHOUT WARRANTY OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE AUTHOR (ALEXANDER STAUBO) DISCLAIMS ALL WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. THE AUTHOR (ALEXANDER STAUBO) IS NOT OBLIGATED TO PROVIDE ANY UPDATES TO THE SOFTWARE. SO THERE. What it DoesRedirector is an experimental folder product for redirecting object requests. Any request to a subobject (whether it exists or not) in the folder is redirected to a designated target URL. A flexible mechanism for mapping specific URLs is also provided. For example, you might have an URL such as http: //oldserver/foo (running Zope, of course) which you've moved to your brand new server http://newserver/bar (Zope not required). Once you have deleted or moved the foo folder or object out of the way, create a Redirector object called foo, set its Target property to http://newserver/bar, following which requests for http://oldserver/foo will then be redirected to http://newserver/bar. Given this, if a user then requests http://oldserver/foo/fnargh, the request will simply be redirected to http://newserver/bar/fnargh. In fact a call such as http://oldserver/foo/fnargh/something/doSomething?param=blah will also correctly redirect to http://newserver/bar/fnargh/something/doSomething?param=blah The Redirector object also supports exceptions to this rule: For example, if the old server had a subobject called milk, which now exists on the new server under the name of honey, then you can create a mapping which simply maps the old object to the new object. Mappings support (or rather, require) regular expressions to be used, so you could also map any object starting with the letter M to a specific object. Regular expression groups are supported. A \n where n is an integer in the replacement field will be replaced by the corresponding group in the FROM: field. See the python regular expression syntax for clarification on this. Added bonus feature: If you set the Redirector to "hard mapping" mode, it will fall back to the default target URL if none of the mappings match the requested URL. That means -- if you're like me, converting a dull old Netscape server to a new Zope site with lots of magic fairy dust added -- that you can create mappings for all the old documents that should be redirected to their Zopefied counterpart URLs, but for all the documents that are deprecated on the new server, the redirection will be set to the server's root folder. Whats New
DocumentationFile under "self-explanatory". In short, what you're seeing here is what you get. Bugs and SuchThis being an experimental Zope Product, I can't promise that it will work as promised. Indeed, I won't promise anything. I can only give the typical excuse that "it works here". Please report problems to me. If you include the line "This is important and you're just one dandy programmer, Alex!" I'll promise to give you lots of priority. Future Improvements
|
|
Available Releases
Version | Maturity | Platform | Released |
---|---|---|---|
1.1 | Development | 2002-03-24 17:19:13 | |
Redirector1_1.tgz (7 K) | All |