Вопрос

i am wondering how to redirect all 302's to a different url as 404's using htaccess or apache?

i prefer the htaccess method

maybe something like Redirect 302 /PATH_TO_REDIRECT NEW_LOCATION_URI

but how do i tell the new url to be a 404

any ideas?

Это было полезно?

Решение

you do:

RewriteEngine On
RewriteBase /

RewriteRule ^(.*)$ http://www.this-is-ma-new-404.com/$1 [R=301,L]

in your .htaccess.

==

for your own custom 404 use:

ErrorDocument 404 /custom404.html 
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top