Redirects Files That Don't Exist
JeremyL - August 29, 2008 - 16:33
| Project: | Global Redirect |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
When a file / folder doesn't exist GR should not be redirecting to remove the trailing slash.
For example you go to domain.com/nonexistantdirectory/ and sends a 301 redirect to the browser or search bot and redirects to domain.com/nonexistantdirectory which then returns a 404 code.
This might cause issues with search engine bots getting confused as to why you are 301 redirecting to a 404 code.
GR should first check to see if there is something at domain.com/nonexistantdirectory and if not, then let the usual 404 code be served for domain.com/nonexistantdirectory/

#1
This is impossible/impractical.
It would mean doing a full look-ahead if a redirect is to happen. This may not NECESSARILY be a file - it might be a drupal callback...
If you want to submit a patch it can be reviewed and tested - but GR is a lightweight module. GR 'normalises' (in a loose sense) the URL (if there isn't an existing file match).
Thanks for the suggestion though - its a good idea, but I don't believe its practical.