Welcome Guest, Not a member yet? Register   Sign In
How to use - instead of _ in CI 3.0?
#1

(This post was last modified: 12-26-2014, 08:19 AM by zaltanklis.)

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
Reply
#2

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/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB