What I'm trying to do is make a regex that will get rid of the trailing slashes on my URL. I'm also using a Wordpress plugin for redirection that allows me to put / without doing \/ . The following is what's giving me the most trouble:
/tag/logo/
and
/tag/logo/feed/
I can get either the first or the second to work, but never both at the same time. The plugin has a input and output section, but I'm not quite sure how to work it out. If I get the first to work, the URL ends up looking like this on feed pages:
/tag/logofeed
So far, this is the last regex I've used:
Input:/category/((.*)(/feed)?)/
Output:/category/$1
I don't have that much experience writing these, but I was hoping to get the regex to work for both /logo/ and /logo/feed/ . Is what I'm trying to do even possible?



Reply With Quote


Bookmarks