{ "info": { "author": "Jens Vagelpohl", "author_email": "jens@dataflake.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Zope2", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Site Management", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "======================\n Products.JRedirector\n======================\n\n.. contents:\n\nThe JRedirector package provides an object that is capable of \nredirecting web requests in a controlled fashion and keeping logs \nabout it.\n\nI wrote it so that when I move pieces of my sites around I have \na way of specifying where users will go if they navigate to the old \nobsolete location. This is helpful if your site is linked from \nother sites and you have no control over the accuracy of these \noutside links.\n\nThe administrator can add mappings from old path to new path where \nthe user will be redirected to when he tries to visit the old path. \nThe HTTP header sent along with this redirect can be specified, \navailable choices are \"301\" (moved permanently) or \"302\" (moved \ntemporarily).\n\nThe object will keep an internal log of all web requests that are \nreferred to it and presents it on a logging output page.\n\n\nUsage\n=====\nThe administrator creates a JRedirector object in a given \nlocation in site. Invoking the redirection capabilities must happen \nexplicitly, for example from standard_error_message, by calling \nthe JRedirector object and passing REQUEST.\n\nAs an example, here is the snippet of my standard_html_error that \ninvokes the JRedirector object::\n\n \n \n \n\nThis will fire whenever a \"NotFound\" error occurs. If the path \nthe user attempted to go to is not in the explicitly mapped \nlist of paths defined by the administrator in the JRedirector\nobject \"Mappings\" tab then nothing will happen and the \nstandard_error_message will continue to render normally. If the\nlooked-for path is explicitly mapped then the user will be \nredirected and will never see standard_error_message.\n \n\nRequirements\n============\nThis package requires Zope 2.8 and up.\n\n\nHTTP Status Codes related to redirecting requests\n=================================================\nThe following is taken from RFC 2616 which describes the HTTP/1.1\nspecification. The RFCs can be found in various locations on the\nInternet, I found it here::\n\n ftp://ftp.isi.edu/in-notes/rfc2616.txt\n\nNot all status codes are understood by all browsers. If you are worried\nabout older browsers you should restrict your usage to status codes\n301 for permanently moved pages and 302 for temporary moves.\n\n301 Moved Permanently\n---------------------\nThe requested resource has been assigned a new permanent URI and any\nfuture references to this resource SHOULD use one of the returned\nURIs. Clients with link editing capabilities ought to automatically\nre-link references to the Request-URI to one or more of the new\nreferences returned by the server, where possible. This response is\ncacheable unless indicated otherwise.\n\nThe new permanent URI SHOULD be given by the Location field in the\nresponse. Unless the request method was HEAD, the entity of the\nresponse SHOULD contain a short hypertext note with a hyperlink to\nthe new URI(s).\n\nIf the 301 status code is received in response to a request other\nthan GET or HEAD, the user agent MUST NOT automatically redirect the\nrequest unless it can be confirmed by the user, since this might\nchange the conditions under which the request was issued.\n\nNote: When automatically redirecting a POST request after\nreceiving a 301 status code, some existing HTTP/1.0 user agents\nwill erroneously change it into a GET request.\n\n302 Found\n---------\nThe requested resource resides temporarily under a different URI.\nSince the redirection might be altered on occasion, the client SHOULD\ncontinue to use the Request-URI for future requests. This response\nis only cacheable if indicated by a Cache-Control or Expires header\nfield.\n\nThe temporary URI SHOULD be given by the Location field in the\nresponse. Unless the request method was HEAD, the entity of the\nresponse SHOULD contain a short hypertext note with a hyperlink to\nthe new URI(s).\n\nIf the 302 status code is received in response to a request other\nthan GET or HEAD, the user agent MUST NOT automatically redirect the\nrequest unless it can be confirmed by the user, since this might\nchange the conditions under which the request was issued.\n\nNote: RFC 1945 and RFC 2068 specify that the client is not allowed\nto change the method on the redirected request. However, most\nexisting user agent implementations treat 302 as if it were a 303\nresponse, performing a GET on the Location field-value regardless\nof the original request method. The status codes 303 and 307 have\nbeen added for servers that wish to make unambiguously clear which\nkind of reaction is expected of the client.\n\n303 See Other\n-------------\nThe response to the request can be found under a different URI and\nSHOULD be retrieved using a GET method on that resource. This method\nexists primarily to allow the output of a POST-activated script to\nredirect the user agent to a selected resource. The new URI is not a\nsubstitute reference for the originally requested resource. The 303\nresponse MUST NOT be cached, but the response to the second\n(redirected) request might be cacheable.\n\nThe different URI SHOULD be given by the Location field in the\nresponse. Unless the request method was HEAD, the entity of the\nresponse SHOULD contain a short hypertext note with a hyperlink to\nthe new URI(s).\n\nNote: Many pre-HTTP/1.1 user agents do not understand the 303\nstatus. When interoperability with such clients is a concern, the\n302 status code may be used instead, since most user agents react\nto a 302 response as described here for 303.\n\n307 Temporary Redirect\n----------------------\nThe requested resource resides temporarily under a different URI.\nSince the redirection MAY be altered on occasion, the client SHOULD\ncontinue to use the Request-URI for future requests. This response\nis only cacheable if indicated by a Cache-Control or Expires header\nfield.\n\nThe temporary URI SHOULD be given by the Location field in the\nresponse. Unless the request method was HEAD, the entity of the\nresponse SHOULD contain a short hypertext note with a hyperlink to\nthe new URI(s) , since many pre-HTTP/1.1 user agents do not\nunderstand the 307 status. Therefore, the note SHOULD contain the\ninformation necessary for a user to repeat the original request on\nthe new URI.\n\nIf the 307 status code is received in response to a request other\nthan GET or HEAD, the user agent MUST NOT automatically redirect the\nrequest unless it can be confirmed by the user, since this might\nchange the conditions under which the request was issued.\n\nBug tracker\n===========\nIf you have suggestions, bug reports or requests please use the issue\ntracker at http://www.dataflake.org/tracker/\n\nSVN version\n===========\nYou can retrieve the latest code from Subversion using setuptools or\nzc.buildout via this URL:\n\nhttp://svn.dataflake.org/svn/Products.JRedirector/trunk#egg=Products.JRedirector\n\n\n------------------------------------------------------------\n\nChangelog\n=========\n\n1.4 (2009-06-23)\n----------------\n\n- Product eggification\n\n- License change to use ZPL 2.1\n\n- overall code modernization\n\n\n1.3 (2002-12-13)\n----------------\n\n- Feature: Allow selection of varying log levels including no\n logging at all. This should put all those at ease who saw \n alarming ZODB growth on very busy sites that see a lot of \n redirections.\n\n- Feature: Added interoperability with virtual hosting. The \n latest versions of Zope seemed to have changed the values that\n get inserted into the PATH_INFO REQUEST-variable if a\n VirtualHostMonster is used. (Tracker item 208)\n\n\n1.2 (2002-12-05)\n----------------\n\n- Feature: Provide data for the Undo tab entries produced by the\n JRedirector\n\n- Feature: Change the internal storage of logging data to be more\n efficient. This change is automatically applied to existing \n JRedirector instances the first time the log is accessed, either \n during a redirect or when the administrator looks up the log \n history in the Zope management interface. This should also fix \n Tracker issue 197 if it was a real issue (my own testing did \n not support these conclusions).\n\n\n1.1 (2002-10-20)\n----------------\n\nThis is the \"Josef Meile Appreciation Release\". Virtually \nall suggestions for improvements in this release came from \nJosef.\n\n- Feature: Referrers to faulty URLs are now tracked as well. They\n are listed on the Log tab.\n\n- Feature: Mappings and Log views have been reorganized a little\n to be more obvious about what they show and to avoid having to \n scroll the browser window sideways if a URL is overly long.\n\n- Feature: All displayed URLs are now clickable and will open in a\n new window. This allows for quickly testing the old and new paths \n on the Mappings tab as well as the referrers listed on the Log tab.\n\n- Feature: Old paths that are specified with a trailing \"/\" (slash)\n characters will have it stripped to prevent matches on directory \n paths failing because most people just don't use trailing slashes \n when referring to directories.\n\n\n1.0 (2002-10-12)\n----------------\n\n- Feature: Case-insensitive matching of requested paths to redirects\n (first suggested by Josef Meile).\n\n- Feature: Ability to clear the current logs from the ZMI (suggested\n by Josef Meile).\n\n- Feature: Multiple paths can now be redirected to a single new path\n by specifying a \"Wildcard Mapping\". Wildcard mappings are used for \n those requested URLs that have not matched any other non-wildcard \n rule and that are *underneath* the path specified as Old Path when\n setting up the mapping.\n\n- Feature: Added more allowed HTTP response codes and an explanation\n of these codes in README.txt\n\n- Bug: Highlight the correct ZMI tab after submitting anything from \n the \"Mappings\" and \"Log\" tab.\n\n- Bug: Use REQUEST.PATH_INFO instead of REQUEST.URL because \n PATH_INFO always contains the full path during traversal,\n whereas URL only contains the path up to the currently\n traversed element. This fixes a bug that prevented redirecting\n to a path that had nothing in common with the requested\n path. Thanks to Josef Meile for pointing this out.\n\n\n1.0beta2 (2002-01-16)\n---------------------\n\n- Feature: __call__ is now equivalent to calling the redirect method, \n making usage even easier. Now you can just activate it like\n this: `redirector_object(REQUEST)`\n\n\n1.0beta1 (2002-01-16)\n---------------------\n\n- First working code version\n\n\n------------------------------------------------------------\n\nDownload\n========", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/Products.JRedirector", "keywords": "web zope zope2 redirector", "license": "ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)", "maintainer": null, "maintainer_email": null, "name": "Products.JRedirector", "package_url": "https://pypi.org/project/Products.JRedirector/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Products.JRedirector/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/Products.JRedirector" }, "release_url": "https://pypi.org/project/Products.JRedirector/1.4/", "requires_dist": null, "requires_python": null, "summary": "Simple Zope 2 redirection manager object", "version": "1.4" }, "last_serial": 802615, "releases": { "1.4": [ { "comment_text": "", "digests": { "md5": "a427e60d24ffc750940f62b150b2bbd8", "sha256": "5e9b3ce08d304f721ff07e2bda9bf622e42ba86776db64e58a9e4b557731f4f9" }, "downloads": -1, "filename": "Products.JRedirector-1.4.tar.gz", "has_sig": false, "md5_digest": "a427e60d24ffc750940f62b150b2bbd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19958, "upload_time": "2009-06-23T13:05:00", "url": "https://files.pythonhosted.org/packages/29/9f/eef0e087a38985f4107715b39afb22509e6a9325ae82d4d8b3efd1d37e48/Products.JRedirector-1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a427e60d24ffc750940f62b150b2bbd8", "sha256": "5e9b3ce08d304f721ff07e2bda9bf622e42ba86776db64e58a9e4b557731f4f9" }, "downloads": -1, "filename": "Products.JRedirector-1.4.tar.gz", "has_sig": false, "md5_digest": "a427e60d24ffc750940f62b150b2bbd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19958, "upload_time": "2009-06-23T13:05:00", "url": "https://files.pythonhosted.org/packages/29/9f/eef0e087a38985f4107715b39afb22509e6a9325ae82d4d8b3efd1d37e48/Products.JRedirector-1.4.tar.gz" } ] }