This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
cleanse_
I currently am looking to mess around with a new style of urls:
- w3.org/Provider/Style/URI
- https://www.nngroup.com/articles/url-as-ui/
- http://jarlowrey.com/blog/urls-are-ui-rails-5.html
I have tried using default OctoberCMS page/component creation, but the redirect part is where I have hit a wall...
Let's pretend we're using an Event model:
- If we go to
/event/event_id/slug
then we can load the page. Success! - If we go to
/event/event_id/bad_slug_name
the routing should look at theevent_id
and redirect to a url with the correctevent_id
+slug
. We corrected the error automatically! - If we go to
/event/wrong_event_id/slug
or/event/wrong_event_id/bad_slug_name
we redirect to our/404
.
Is this doable outside of using a routes file? https://gist.github.com/Cleanse/d3bad80d9b253ee7b42c10692a06b5c6
Last updated
1-1 of 1