Domanda

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?

È stato utile?

Soluzione

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 
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top