Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How to remove trailing slash from generated URLs

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

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

Page: 1
Go to End
Author Topic: 1328 Views
  • TotalNet
    Community Member
    181 Posts

    How to remove trailing slash from generated URLs Link to this post

    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?



  • Garrett
    Community Member
    245 Posts

    Re: How to remove trailing slash from generated URLs Link to this post

    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?


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.