Jump to:

23480 Posts in 18951 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: 1324 Views
  • TotalNet
    Avatar
    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?

    Cheers

    Rich

  • Garrett
    Avatar
    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?

    //Garrett

    1324 Views
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.