How you tou make friendly URLS in Lucee?

In the past I’ve been using IIS and its URL Rewrite functionality to provide friendly URLs. But now I’m not using IIS any more and only Lucee, what’s the best way to achieve the same thing?

Or should I start using IIS again?

The sort of thing I’m talking about is to recognise a url like ‘http://127.0.0.1:63185/community

Cheers
Mike Kear
Windsor, NSW, Australia

If you are using CommandBox to start your servers, you can activate basic framework rewrites that work with ColdBox or FW/1 with

server set web.rewrites.enable=true

Which turns

http://127.0.0.1:63185/community

into

http://127.0.0.1:63185/index.cfm/community

Or for custom rewrites, you can place them right in your server.json as server rules:

{
  "web" : {
    "rules" : [
      "path('/community') -> rewrite('/community.cfm')"
    ]
  }
}

If you’re not using CommandBox, then your options depend on what servlet container you’re using. Tuckey rewrite (which is what the first command I showed actually activates on CommandBox) can be setup manually on Tomcat for example.

Oh jeez that looks great!! Thank you

Cheers
Mike Kear
Windsor, NSW, Australia