【发布时间】:2018-11-04 18:25:28
【问题描述】:
您好,我尝试通过旧路径中的 htacces 重写 URL
https://example.com/staticword-randomword/random-words/target.php
到新的路径
https://example.com/new/target.php
我尝试用这个重写命令来管理这个:
RewriteRule ^staticword(.*)/(.*)/ new/$1 [L,R=301]
不幸的是,我对这些重写命令和重写的 URL 不是很好
https://example.com/new/-randomword/random-words/
有人可以指出解决方案吗?
提前致谢。
【问题讨论】:
标签: apache .htaccess url url-rewriting