Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to remove trailing slash from generated URLs

Go to End

2 Posts   1923 Views


Community Member, 181 Posts

6 July 2009 at 2:48pm

Edited: 06/07/2009 2:49pm

There is probably a good reason that the CMS adds a trailing slash "/" to all links generated by it, however, I would like to remove this because it interferes with relative URLs and while I know this can be partially solved with the base tag it doesn't help when I want to append a query string or anchor to the current URL.

Is there a directive that can be put in _config.php to override this behaviour?




Community Member, 245 Posts

22 October 2009 at 9:32am

HEAR HEAR! I am having a huge issue with this, actually, using the StaticPublisher. All the links in my static html files have trailing slashes and (as a result of something configured in .htaccess) it causes none of the links to work! The links ONLY work withOUT the trailing slash, and generate 404's WITH. Any ideas??

This is an urgent problem. ANY and ALL help would be greatly appreciated. How can I remove them?