我正在设置一个新的RewriteRule,网页将不会显示。它抛出一个HTTP-Error,比如404或BadRequest。这取决于我使用的组合。我通常想要使用的重写是可能的吗?
我们想要配置以下重写:
这种重写是有效的:
RewriteRule ^/context1/contetx2/context3/context4/Reisen.de.html https://www.test.at/context1/contetx5/context6/2018/context7/Reisen.html [R=301,L]但是我们想要“删除”浏览器中显示的URL中的路径/位置"2018“。它应该看起来像:https://www.test.at/context1/contetx5/context6/context7/Reisen.html
我已经用R,QA,P,L,PT,ProxyPass,RewriteCond等等来做了很多的组合。
预期:输入URL:https://www.test.at/context1/contetx2/context3/context4/Reisen.de.html
在浏览器中显示(地址行):https://www.test.at/context1/contetx5/context6/context7/Reisen.html
可通过以下方式访问内容:https://www.test.at/context1/contetx5/context6/2018/context7/Reisen.html
发布于 2019-03-28 16:55:45
尝试:
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]https://stackoverflow.com/questions/55392889
复制相似问题