When you try to visit example.com/non-existent-path, instead of a 404 "Page Not Found" error, a 301 to the frontpage happens.

At first I didn't care/and or notice, but once I needed to use the path_redirect module, it became a real problem. As the lack of returned 404 errors renders the path_redirect module useless (it doesn't redirect unless there is a 404).

Is there any way around this?

Comments

irakli’s picture

Status: Active » Postponed

One way would be to stop letting Drupal's index.php handle 404s, by changing corresponding line in .htaccess/virtualhost configuration. Which is a common task in optimizing Drupal and a good idea for performance reasons, anyway.

I will also look into shorturl code to see what can be done there, as well.

Thanks

__mark’s picture

Thanks for the help! Unfortunately, .htaccess & vhosts are still completely foreign concepts to me, no matter how many times I google and read my .htaccess file.

If it's at all possible, could you post a couple example lines? I tried

# ErrorDocument 404 /index.php
 ErrorDocument 404 /404.txt

but it did nothing. Is it possible to set up the short domain's virtualhost in the .htaccess file too?

Update: luckily I'm not the only one: http://drupal.org/node/431852

mably’s picture

Issue summary: View changes
Status: Postponed » Closed (outdated)

This issue was filed against the previous Drupal 6/7 module that used this project namespace.

The namespace has been taken over and the module has been replaced by a completely new and unrelated project for Drupal 10/11.

The original code remains available in the 6.x-1.x branch.

Closing this issue as it no longer applies to the current module.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.