Get Silverstripe to ignore URL Segments after the first one

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version:

I am loading a section of a page with a ‘detail’ view via Ajax, which I want to be able to share with the format of /page/item/ . I am adding a url segment in the address bar with JS, but I want to be able to detect the shared url as well.

I am able to do this with JS easily enough, but I need Silverstripe to ignore the extra bit on the URL, as I’m getting a 404. How do I do that?

// Include any relevant code. If you have a lot of code, link to a gist instead.

Personally I would just change your pattern to /page#item :smile: but this solution may help you out and here are relevant docs Routing – SilverStripe Documentation