I am trying to match all URIs that begin with #/tool_[a-z\-]+#
except if it's followed by /public
. Such as /tool_calculator
or whatever.
For example, if the URI begins with /tool_store-front
or /tool_store-front/anything-but-public
then I want to redirect them to HTTPS. So, /tool_store-front/public
would not redirect.
Here's what I have and it's not working
RewriteCond %{HTTPS} =off
RewriteCond %{REQUEST_URI} ^/?tool_[a-z-]+(?!/public.+) [OR]
RewriteCond %{REQUEST_URI} ^/?secure
RewriteCond %{REQUEST_URI} !^/?secure/public/info
RewriteRule ^(.*)$ https://www.example.org%{REQUEST_URI} [NC,L]
[a-z]+
as you said? I didn't quite follow :'( – Seaweed