Can I have 'friendly' url's without a URL rewriter in IIS?

前端 未结 3 893
忘了有多久
忘了有多久 2021-01-25 01:35

Without having a url rewriter such as ISAPI_Rewrite available, is it possible to achieve the following:

I would like a user to browse to http://www.jjj.com/directo

3条回答
  •  醉酒成梦
    2021-01-25 02:25

    You're asking how to cut something but telling us you're not allowed to use a knife or anything resembling one.

    Here's my only clever idea using onMissingTemplate().

    GET /directory/
    -> 404.cfm
    ->
    -> fires onMissingTemplate() where you ignore the "special.cfm" bit and just use the rest of the requested path to figure out what controller to wire up to.

    This is a kludgy hack, though, so I would try to avoid it myself. Maybe if you explain why ISAPI Rewriting isn't an option, then we might be able to help further.

提交回复
热议问题