[英]Apache Rewrite Dynamic Subfolder
Can i rewrite the urls in .htaccess like below example and remove a dynamic part from url?我可以像下面的示例那样重写 .htaccess 中的 url 并从 url 中删除动态部分吗?
https://example.com/abc/123/efg
=> https://example.com/abc/efg
https://example.com/abc/123/efg
=> https://example.com/abc/efg
while 123
is dynamic.而
123
是动态的。
I just use RedirectMatch directive like this:我只是像这样使用 RedirectMatch 指令:
RedirectMatch 301 /abc/([0-9]+)/(.*) /abc/$2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.