Hello:
I'm trying to point the Hunchentoot default page to my /index page, but i can't figure how.
Here is my dispatch table:
(setq *dispatch-table* (nconc (list 'dispatch-easy-handlers (create-static-file-dispatcher-and-handler "/favicon.ico" "/usr/share/vhosts/hdemo/favicon.ico") (create-static-file-dispatcher-and-handler "/main.css" "/usr/share/vhosts/hdemo/main.css")) (mapcar (lambda (args) (apply #'create-prefix-dispatcher args)) '(("/index" main-page) ("/admin" admin-page) ("/showpost" showpost) ("/editpost" editpost) ("/showtopic" show-topic-page))) (list #'default-dispatcher)))
What i want is when i point my browser to:
I get the /index page not the default page (currently i get the Hunchentoot defaul page).
Any clues would be appreciated.
Thank you.
Erick Lopez Carreon wrote:
Hello:
I'm trying to point the Hunchentoot default page to my /index page, but i can't figure how.
Here is my dispatch table:
(setq *dispatch-table* (nconc (list 'dispatch-easy-handlers (create-static-file-dispatcher-and-handler "/favicon.ico" "/usr/share/vhosts/hdemo/favicon.ico") (create-static-file-dispatcher-and-handler "/main.css" "/usr/share/vhosts/hdemo/main.css")) (mapcar (lambda (args) (apply #'create-prefix-dispatcher args)) '(("/index" main-page) ("/admin" admin-page) ("/showpost" showpost) ("/editpost" editpost) ("/showtopic" show-topic-page))) (list #'default-dispatcher)))
What i want is when i point my browser to:
I get the /index page not the default page (currently i get the Hunchentoot defaul page).
Any clues would be appreciated.
Thank you.
Try adding this form to the bottom (after the /showtopic handler)
("/" main-page)
--Jeff
On Fri, 2007-06-22 at 19:01 -0700, Jeff Cunningham wrote:
Try adding this form to the bottom (after the /showtopic handler)
("/" main-page)
That does the trick! :)
A few moments ago i try something similar:
(mapcar (lambda (args) (apply #'create-prefix-dispatcher args)) '(("/" main-page) ("/admin" admin-page) ("/showpost" showpost) ("/editpost" editpost) ("/showtopic" show-topic-page))) (list #'default-dispatcher)))
But then the only page i could see was the one of the main-page handler 8) so now I realize that the order is relevant :) (and i suspect i need re-read the documentation).
Thank you very much.