从退休管理员那里继承了一个问题。我们有 1900 多行 .htaccess,我必须首先进行整合。
而不是写700次
重写条件
重写规则
我想根据 HTTP_HOST 将请求分组为
RewriteEngine On
RewriteOptions Inherit
<If "%{HTTP_HOST} == 'www.my-domain.com'">
RewriteRule ^hta-test(/(index\.php)?)?$ https://www.hmy-domain.de/de/RewriteRule.php [NC,R=301,L]
</If>
但是 RewriteRule 没有被执行。如果我使用“RewriteMatch”,这是有效的(这告诉我“
如何使
或者 mod_alias 中有类似的功能吗?
亲切的问候 疯子_
PS:我知道,1900行htaccess是垃圾。
httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewriterule:每个目录重写:* If 块遵循目录上下文的规则。
我的错,不理解文档。