Question

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?

Was it helpful?

Solution

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 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top