Http 301

software development

#1

Dreamhost’s custom error messages do not seem to include HTTP 301 permanent redirects. Anyone have a suggestion other than an HTML “refresh” redirect?

Cheers,

Isabelle

Web Design, Development and Web Management Training


#2

Consider using .htaccess to redirect pages.

Suppose old.htm is is gone for good and you want users looking for it to be redirected to new.htm, add this line to your .htaccess file:
redirect /old.htm http://yourdomain.tld/new.htm

You can also use this method to redirect entire directories:
Redirect /olddir http://domain.com/newdir/

…or if you have simply changed file extensions:
Redirect /dir/file.htm http://domain.tld/dir/file.pdf

-Marsbar


#3

Create your own, add to .htaccess

ErrorDocument 301 "

HTTP 301 Moved Permanently

new uri

or

ErrorDocument 301 /moved.html
(where moved.html displays the error message)

Do not use an external URI as that will send 302 instead.

:cool: Perl / MySQL / HTML+CSS