经过所有的研究,我还没有找到这个问题的答案。
在旧网站上,html 文件的格式为 http://www.example.com/folder/file.html 我用 url 格式在 wordpress 中构建了新站点 http://www.example.com/folderfile/ 我用 rewriterule 剥离 .html 没问题,但我怎样才能删除/after 文件夹?有什么办法可以让
http://www.example.com/folder/file.html 重定向到 http://www.example.com/folderfile/ 自动?
感谢任何建议!谢谢!
最佳答案
试试这个:
RewriteRule ^(.*)/(.*).html$ ./$1$2/ [QSA]
关于php - 重写规则重定向文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13738814/