You are not logged in Log in Join
You are here: Home » Members » The Zope presence of Dylan Jay » Redirector 1.1 » dc_view

Log in
Name

Password

 
 


Dublin Core Elements

The Dublin Core metadata element set is a standard for cross-domain information resource description.
Element Description Value
Identifier resource ID http://old.zope.org/Members/djay/Redirector1_1
Title resource name Redirector 1.1
Description resource summary Redirector Copyright � 1999 "Alexander Staubo":mailto:[email protected]. Extended 1999 "Dylan Jay":mailto:[email protected]. <pre> 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. </pre> What it Does Redirector 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 * Support for redirection of whole subtrees * Support for redirection of query string * Grouping in the maps Documentation File under "self-explanatory". In short, what you're seeing here is what you get. Bugs and Such This 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":mailto:[email protected]. 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
Creator resource creator ZopeOrgSite
Date default date 2002-03-24 17:19:13
Format resource format text/html
Type resource type Software Package
Subject resource keywords Navigational
Contributors resource collaborators
Language resource language
Publisher resource publisher No publisher
Rights resource copyright


Additional Zope Elements

Element Description Value
CreationDate date resource created 2002-03-24 17:19:13
ModificationDate date resource last modified 2002-03-24 17:19:13
EffectiveDate date resource becomes effective None
ExpirationDate date resource expires None

Backlinks: via Google / Technorati