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_
cleanse_

I currently am looking to mess around with a new style of urls:

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 the event_id and redirect to a url with the correct event_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

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.