CodeIgniter Forums

Full Version: How to use - instead of _ in CI 3.0?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As I know character _ is prohibit in CI, I really want to use "-" in link. Have anyone know how to use "-" in CI 3.0 ? I mean display link.

I am using nginx so have any guide to rewrite _ to - ?

Thank you
In CI 3.0 you can go to routes.php and set 'translate_uri_dashes' to TRUE. This way, the application will automatically translate uri's with "-" to controllers with "_". See more here: http://avenir.ro/codeigniter-tutorials/r...ndly-urls/