|Top Previous Next|
addModRewrite allows you to create URL that do not exists in your httpd folder and translate them to existing files. This for example is very handy if you wish to create a Restful server in Girder.
For example say you'd like to accept a url in this form:
You could create a .lhtml that takes 3 cgi parameters:
let's name that modrewrite.lhtml and place it in the httpd directory. In a scripting action register the rewrite. Probably a good idea to attached a GirderStarted event to this scripting action.
Now next time you pull up this page you should see the parameters displayed.
Note: webserver.addModRewrite should be called before the HTTP request is made.