【发布时间】:2020-01-08 04:24:03
【问题描述】:
我已将我的 wordpress 网站迁移到 html 网站。我想将我的 wordpress url 重定向到现有的 html url。我在新的 html 项目文件中创建了 .htaccess。
旧网址https://test.testproject.net/aboutus/rewards-and-recognitions.html 新网址https://test.testproject.net/features/rewards-and-recognitions.html
旧网址https://test.testproject.net/events/upcoming-events-archive.html 新网址https://test.testproject.net/events.html
旧网址https://test.testproject.net/product-overview/rewards-recognition.html 新网址https://test.testproject.net/features/rewards-recognition.html
旧网址https://test.testproject.net/features/ 新网址https://test.testproject.net/features.html
.htaccess
ErrorDocument 404 /not-found.html
Options -Indexes
Redirect aboutus/rewards-and-recognitions.html http://test.testproject.net/features/rewards-recognition.html [R=301,L]
我已经在新的 html 文件夹路径中编写了我的 htaccess,用于所有旧到新的 url。
Redirect aboutus/rewards-and-recognitions.html http://test.testproject.net/features/rewards-recognition.html [R=301,L] //shows forbidden error
如何为上述所有从旧到新的 url 重定向编写 htaccess
【问题讨论】:
标签: php html wordpress apache .htaccess