Apache 如何设置特定的重写规则?

Apache 如何设置特定的重写规则?,apache,http,Apache,Http,我正在设置一个新的重写规则,网页将不会显示。它抛出一个HTTP错误,如404或BADDRequest。这取决于我使用的组合。 我通常想使用的重写是否可能 我们要配置以下重写: 这一重写工作: RewriteRule ^/context1/contetx2/context3/context4/Reisen.de.html https://www.test.at/context1/contetx5/context6/2018/context7/Reisen.html [R=301,L] 但我们

我正在设置一个新的重写规则,网页将不会显示。它抛出一个HTTP错误,如404或BADDRequest。这取决于我使用的组合。 我通常想使用的重写是否可能

我们要配置以下重写:

这一重写工作:

RewriteRule ^/context1/contetx2/context3/context4/Reisen.de.html  https://www.test.at/context1/contetx5/context6/2018/context7/Reisen.html  [R=301,L]
但我们希望在浏览器中显示的URL中“删除”路径/位置“2018”。 应该是这样的:

我已经用R,QA,p,L,PT做了很多组合; ProxyPass、RewriteCond等

预期: 输入URL:

在浏览器中显示(地址行):

可通过以下方式访问内容: 试试:

RewriteRule ^/context1/contetx2/context3/context4/Reisen.de.html  /context1/contetx5/context6/context7/Reisen.html  [R=301,L]
RewriteRule ^/context1/contetx5/context6/context7/Reisen.html  /context1/contetx5/context6/2018/context7/Reisen.html  [L]

你好,非常感谢。它现在可以工作了,但我们将第二个条目从[L]更改为[P,L]。
[P]
应该不需要,除非原始路径和重写路径不在同一服务器上