I would like to 301 redirect my URL that has a trailing slash to a URL without a trailing slash. That part is simple (RewriteRule ^(.*)\/(\?.*)?$ $1$2 [R=301,L]
)
However I only want to do it if that directory is /abc/
For example:
http://www.example.com/abc/cowboy/
should be 301ed tohttp://www.example.com/abc/cowboy
http://www.example.com/xyz/cowboy/
should stay the same and NOT be 301ed