This project is read-only.

Remove trailing slash

Sep 6, 2011 at 2:48 PM

I'm trying to write a rule to remove a trailing slash from a url. The JobsBlog site has a page called 'Zen of PM' with a url of They added the trailing slash onto the slug there because apparently there were a number of users who bookmarked the page on their old site that way and were getting a 404 when trying to visit the page (which we created in Orchard as just /zen-of-pm).

So I'm trying to use this rule to rewrite it without the slash, but it's not working:

RewriteRule ^(zen-of-pm)/$ /$1
I've tried a couple of different variations of this but not having success. Any idea how to write the rule to remove a trailing slash from a url in Orchard?

Sep 6, 2011 at 6:22 PM

Fixed and published


Sep 6, 2011 at 6:38 PM

Ha, I was sure I had something wrong in my rule. :-)