| name: | rewrite |
| author: | Steven Armstrong |
| description: | Request rewrite plugin. Similar to Apache mod_rewrite.
Sends a '301 Moved Permanently' status code allong with the new location
of the resource.
Generates a simple html page with a meta-refresh and a link to the new
resource as a fallback version for clients that do not understand http
header redirects.
Configurable through a variable in config.py:
py['rewrite_rules'] = {
'^/old$': r'/new',
'^/olddir/(.*)': r'/newdir/\1',
'^/nothere/(.*)': r'http://www.example.com/here/it/is/\1'
}
|
| url: | http://www.c-area.ch/code/ |
| download: | http://www.c-area.ch/code/pyblosxom/plugins/ |
| category: | headers |
| last edited: | Apr 05, 2008 (Saturday) |
news RSS