开发者

combine error 404 with redirect 301

开发者 https://www.devze.com 2022-12-21 13:25 出处:网络
I was wondering if it\'s possible to use 404 error and 301 redirect 开发者_StackOverflow中文版in the same .htaccess like this:

I was wondering if it's possible to use 404 error and 301 redirect 开发者_StackOverflow中文版in the same .htaccess like this:

I have found the most urls which are important that people will be redirected. For the 404 error, these are for the "left overs"

Can it be used like this, if there is no rule for a 301, a 404 error applies or will the 301 redirect being skipped?

Redirect 301    /webdesign.html http://www.friesecomputerservice.nl
Redirect 301    /Home.html  http://www.friesecomputerservice.nl
Redirect 301    /computerapk.html   http://www.friesecomputerservice.nl/computer-apk.html
Redirect 301    /laptopreparatie.html   http://www.friesecomputerservice.nl/laptop-reparatie.html
Redirect 301    /logoweb20.html http://www.friesecomputerservice.nl
Redirect 301    /partners.html  http://www.friesecomputerservice.nl
Redirect 301    /tragecomputeroflaptop.html http://www.friesecomputerservice.nl/computer-apk.html

RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} .
RewriteRule ^index.php http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^tag http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^component http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^Artikel http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^All-in-One http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^Intel http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^AMD http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^Norton http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^3.5-inch http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^Acer http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^Toshiba http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^Linksys http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^2.5-inch http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^DDR2 http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^Geluidskaarten http://www.friesecomputerservice.nl [R=301,L]
RewriteRule ^Kaspersky http://www.friesecomputerservice.nl [R=301,L]


ErrorDocument 404 /index.html


Yes, you can do that.

0

精彩评论

暂无评论...
验证码 换一张
取 消