There are use cases where we want to look for content and redirect there if path is not known for Drupal. This can be easily configurable by Rules, if there will be event "404 not found happened".

There are ways how to hack it (Drupal init event and regexp match, Node init and check if node is 404 page, …), but all has performance issues of are otherwise bad.

Comments

Bobík created an issue. See original summary.

TR’s picture

How about instead a Condition to compare the page HTTP status code?

That way this feature could detect ANY status code and allow an appropriate action. This would also address #1001862: Is it possible to redirect to [site:url] on 403/404? (which I'm marking as a duplicate now).

Honza Pobořil’s picture

Yes, this will work, but probably will not perform like dedicated event, because rule will be executed on all requests.

TR’s picture

Version: 7.x-2.x-dev » 8.x-3.x-dev
Status: Active » Postponed

We're not looking to add a lot of new features to D7 Rules anymore - new features should go into the current D8 version of Rules then should be backported IF there is sufficient demand from the community.

Because of that, I'm moving this to Rules 8.x-3.x. But this is not something the maintainers are currently intending to work on, so I'm also marking it as postponed.

If you would like to contribute an implementation of this feature please mark this issue "active" and assign it to yourself.

TR’s picture

TR’s picture

Status: Postponed » Closed (won't fix)

Hey, if no one wants this and no one is willing to contribute, and if I don't personally find this useful, then there's no way this is going to be added to core Rules. If you want to have this feature then either:
1) contribute a patch here in the the Rules issue queue, or
2) implement this feature in a contribute module, and post here in the issue queue letting us know about your contributed module.