I have a category on my forum which is restricted to specific user groups. When I provide the direct link to a user it leads to a 404 error if clicked when he is not logged in. If he is logged in the link works fine and points to the restricted area.
Is it possible to serve a login page if the user is not logged in? I think it is a bit more friendly and causes less confusion. Now people think that the link is wrong .....
Maybe make it generic. When people try to access a category for which they are not enabled show a login page with some message saying that they have no access to that area?

This section can only be seen by users with a valid subscription.
If you have a valid subscription, please login now

Support is
Online

The support team is online and will be able to answer your inquiries. Please stay calm, follow the rules and do not cross post.

We will attend to you as soon as we can.

Your time
Stack Ideas time