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 allow only routed url to be called with Rest controller?
kchan4
August 2015
Maybe I didn't titled correctly, but here is the detail:
Say I have route configuration:
'/v1/session' =>
'/rest/session'
I only want user can enter the page via the routed url, which is '/v1/session'.
If they entered via '/rest/session' returns 404 or 403 or whatever...
How can I do that?
Harro
August 2015
Accepted Answer
Add a route for it and point it to a method that throws HttpNotFoundException or HttpNoAccessException (on the current Fuel version only).
Route lookup are not recursive, once is route is found the lookup stops.
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,089
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
261
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
August 2015