If a file is removed and no replacement a code of 410 is the correct code to use, I think.

If a page is removed and a redirection is made to say the sitemap an option of using a 410 code might be useful since you want the page dropped from the search engines.and you want to redirect visitors to a page.

Could 410 status code be added in the next revision of the module?

Comments

jjeff’s picture

Status: Active » Closed (works as designed)

This module only handles redirects. The redirect codes are all in the 300 range. You can find a list of them here.

As you say, 410 code is for "Gone" -- pages that are no longer available and have no forwarding information. I don't believe that it would be appropriate (and it's possible that browsers won't accept it) if we send a 401 code along with a redirection header.

The 410 should be handled in the same way that 401s and 403s are handled in Drupal: the appropriate information should be output directly onto the page without redirection. This is best handled by a module other than Path Redirect, since it is not a redirect.

vsr’s picture

Status: Closed (works as designed) » Closed (fixed)

Thanks for the information. You are probably right that the browsers would not accept the code. Thanks for your reply.