我想重定向404页面上的某些页面。我该如何使用htaccess文件来实现它。
http://wowriters.com/author/admin/feed/
http://wowriters.com/reflective-portfolio/essay-writing-service
http://wowriters.com/reflective-portfolio/dissertation-service
http://wowriters.com/samples/essay-writing-service
http://wowriters.com/samples/uae
http://wowriters.com/worlds-biggest-beverages/coursework-help-service
http://wowriters.com/worlds-biggest-beverages/buy-essays
上面的链接应该在404页上消失。
请帮助我。 预先感谢。
答案 0 :(得分:1)
您可以将此规则用作最高规则:
RewriteEngine On
RewriteCond %{REQUEST_URI} /author/admin/feed/ [NC,OR]
RewriteCond %{REQUEST_URI} /reflective-portfolio/(essay-writing|dissertation)-service [NC,OR]
RewriteCond %{REQUEST_URI} /samples/(uae|essay-writing-service) [NC,OR]
RewriteCond %{REQUEST_URI} worlds-biggest-beverages/(buy-essays|coursework-help-service) [NC]
RewriteRule ^ - [L,R=404]
答案 1 :(得分:0)
ErrorDocument 404 http://wowriters.com/author/admin/feed/
ErrorDocument 404 http://wowriters.com/reflective-portfolio/essay-writing-service
ErrorDocument 404 http://wowriters.com/reflective-portfolio/dissertation-service
ErrorDocument 404 http://wowriters.com/samples/essay-writing-service
ErrorDocument 404 http://wowriters.com/samples/uae
ErrorDocument 404 http://wowriters.com/worlds-biggest-beverages/coursework-help-service
ErrorDocument 404 http://wowriters.com/worlds-biggest-beverages/buy-essays
所有未找到页面的页面都会显示链接。