I’m currently using this:
RewriteRule ^random$ ./index.php?view=random
It works when I access: www.site.com/random
But it will not work when I access: www.site.com/random/
When I edited the rewrite to include a slash, it makes it so www.site.com/random/lkajsie would work.. but ideally I only want it to work for www.site.com/random and www.site.com/random/ nothing more.
Is there some kind of regexp to check if there’s a slash in the current rewrite I have? Or is it something else completely?
Change your regex from:
to:
That is, make the final
/optional.