Ivan Gretsky Posted Tuesday at 04:09 PM Posted Tuesday at 04:09 PM Good day! One of my templates has a list of allowed (whitelisted) url segments set (via "Which URL Segments do you want to allow?") . And all of them but one should end with a trailing slash for SEO reasons. The new url segment (called `sitemap.xml`) should work without trailing slash. Could you please suggest how this could be done?
psy Posted Wednesday at 10:24 AM Posted Wednesday at 10:24 AM Untested... and just a starter idea for your use case, but maybe via a hook in site/ready? if ($input->urlSegments->count > 0 && $input->urlSegment(1) === 'sitemap.xml) { rtrim($input->urlSegmentStr() '/'); };
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now