将403错误的wordpress网站重定向到404页面

时间:2019-08-29 06:30:08

标签: php html wordpress .htaccess

我为现有的wordpress网站创建了一个html网站。

在wordpress中,我有一个页面testdomain.com/learn/,现在显示403错误。我想将.html作为testdomain.com/learn.html附加到文件夹名称,并使用htaccess.still重定向到404页面,其显示为禁止

RewriteEngine On RewriteCond %{HTTP_HOST} ^testdomain\.com
RewriteRule (.*) http://testdomain.com/$1 [R=301,L]
RewriteEngine on
RewriteRule ^learn/$ /learn.html [R=301,L]
RewriteRule ^product/integration/$ /product/integrations.html  [R=301,L]
RewriteRule ^aboutus/rewards-and-recognitions.html  /features/rewards-recognition.html   [R=301,L]
ErrorDocument 403 /index.php?error=404
Options -Indexes

0 个答案:

没有答案