Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
How To Route URI Which Contains Hyphens / Dash
protocyber
April 2012
Is it possible to route URI like this: [url=
http://localhost/bla-bla-bla]http://localhost/bla-bla-bla[/url]
mapped to controller:
Controller_Bla_Bla_Bla
or this URI: [url=
http://localhost/bla-bla-bla/do-it]http://localhost/bla-bla-bla/do-it[/url]
mapped to controller:
Controller_Bla_Bla_Bla::do_it()
or even this URI: [url=
http://localhost/folder-name/bla-bla-bla/do-it]http://localhost/folder-name/bla-bla-bla/do-it[/url]
mapped to controller:
Controller_Bla_Bla_Bla::do_it()
which is located in folder:
"folder-name"
I have tried to create the configurations in routes.php but it still doesn't work.
The solution should be able to be applied to any URI with those pattern. Any suggestion how to do this? Thank you very much.
Harro
April 2012
Afaik this isn't possible. The router will not modify the URI segments. You have to do the translation manually using a route.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
April 2012