htaccess - how to apply RegEx patterns on the output of another - encapsulation
问题 I'm performing several regular expressions on a string inside a variable in order to clean it up for further use in the htaccess rules, but it seems rather cumbersome to do such simple thing in several lines: RewriteCond %{THE_REQUEST} (?<=\s)(.*?)(?=\s) RewriteRule ^(.*)$ - [E=HREFPATH:%1] RewriteCond %{ENV:HREFPATH} (^.*)?\? RewriteRule ^(.*)$ - [E=HREFPATH:%1] RewriteCond %{ENV:HREFPATH} /(.*) RewriteRule ^(.*)$ - [E=HREFPATH:%1] RewriteCond %{ENV:HREFPATH} (.*)/$ RewriteRule ^(.*)$ - [E