2013/5/21 Nick Jennings <n...@silverbucket.net>: > Hi All, > > When someone visit www.example.com/foobar I'd like to force a trailing > slash. Here's what I've got so far, but it doesn't seem to be working, and
You may have a look at redirect section : # send redirects for request for articles without a '/'. acl missing_slash path_reg ^/article/[^/]*$ redirect code 301 prefix / drop-query append-slash if missing_slash > I've tried a number of variations to no avail. > > reqrep ^([^\ ]*)\ /foobar(.*) \1\ /foobar/\2 Do you really just try to add a trailing slash here ? What I read here is really much more complex url rewriting. For a simple trailing slash reqrep ^(.*)[^/]$ \1/ may work (untested). > > If someone goes to example.com/foobar/stuff I'd also like to force a > trailing slash. For some reason when pointing to directories, the resource > files are not found unless the directory path ends with a slash. > > But If that second request is too much, I can just stick with the first one. > So that people navigating to that first landing page get it properly > rendered. > > Thanks for any help. > Cheers > Nick > >