Advanced RewritingThe post-read-request stage of request processing can be used for tasks similar to the Request Rewriting module. For example, a webmaster might want to use referrer checking to make sure that users enter the site through the front page, installing the following code at the post-read-request stage as
When the uri method is called with an argument, it causes a notification to be sent to the web server. In this case, that notification will instruct the server to update its record of the requested URL. The handler returns DECLINED to indicate that other post-read-request handlers may still be run. As another example, you might wish to have some user-agent-specific pages, installing the following code on the URI Translation hook as
We use the URI Translation hook here to take advantage of the fact that the web server has already done the hard work of mapping the URI to a filename. However, this means that the handler must keep the physical filename up to date itself using the filename method. To install either of these examples using the Administration Server user interface, save the source code as |
Recently...
Other Resources
|





