Forum Moderators: phranque
RewriteRule ^foo(/)? /bar$1 [NC,L] RewriteRule ^foo(/.*)? /bar$1 [NC,L] If it's "required" then why make it optional?That part makes sense: It means there can be
RewriteRule ^2[0-9]+/ /lorem/“err” indeed. I want to know more about this. We’re talking htaccess, right? So you don’t have the option of looking at the RewriteLog and seeing what's happening. You're saying that if you request
In this one I require the trailing / because it would only ever be called with a file name after, like example.com/20200405/image.jpg. But it works with no problems, so... err?
The /etcetera would only work as intended if you put a $ closing anchor at the end of the pattern:
^foo(/.*)?$
... which you can't do, because the whole point is that there's supposed to be more stuff after the directory name.
:: wandering off to pore over docs to see what on earth I've overlooked ::