Open xspager opened 8 years ago
Yes, the new Regex I wrote for matching friendly URLs on Nginx does what you would expect.
However, if you don't want to make every URL behave this way (as that config would cause) I suspect you would be stuck to rewriting the URL serverside in your controller.
that would depend on the webserver you are using. If you are using apache, for example, you would have to edit the .htaccess file at the root dir of the app and change the regex there.
ping! Did you succeed with this?
Oh, sorry for not answering earlier :( I just gave up using the format I wanted for the URL for now.
I have a problem with relying on the webserver to support more complicated URLs, if for example I wanted to go from Apache to Nginx I would need to rewrite the rules by hand. Would be nice if Sailor itself could handle the "complex" URLs or provided a tool to generate a config file or fragment to a particular webserver from a common format (Lua code/config?)
This has yet to be implemented :x
Maybe we need a generator?
I'm wondering if it is possible to have a controller to respond to a URL like /books/2016/03/22/new_book, for what I checked it end up running the action index and passig parameters like ?2016=03&22=new_book