[Ur] Calling a function when the root / path is requested

Adam Chlipala adamc at impredicative.com
Sat Jun 4 08:15:18 EDT 2011


Chris Double wrote:
> On Sat, Jun 4, 2011 at 10:46 PM, Adam Chlipala<adamc at impredicative.com>  wrote:
>    
>> You can use the 'rewrite' directive to make some function the "default."  If
>> you want this to be function [main] from module [Main], put this in your
>> .urp file:
>>     rewrite url Main/main
>>      
> Won't this stop other url's from working? eg, if there is also a /test
> path calling a 'test' function?
>    

You're right; it would break any other URL that takes arguments.

In the applications I've written, I use a redirect in the web server 
(e.g., Apache) to send the base URL to the URL for the entry page I want.



More information about the Ur mailing list