Expand my Community achievements bar.

SOLVED

Redirecting /libs/granite/core/content/login to Error page in AEM 6.5

Avatar

Level 2

Hi all,

When we hit our marketing site domain https://domain//libs/granite/core/content/login.html we are getting OOTB AEM login page. 

As per our security audit, we are not suppose to show login page and display a error page.

 

In dispatcher we already have DENY rule on this path. But still when we hit our marketing sites domain with above path, it's redirecting to login page.

 

Could you please provide any tips on how to block this login page and redirect to "Pagenotfound" error page.

 

Thanks

Antony

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6.5
1 Accepted Solution

Avatar

Correct answer by
Level 8

At apache, you can write a rewrite rule, which redirects to your custom 404 error page.

 

<VirtualHost *:80>
   ErrorDocument 404 /custom_404.html
// rewirte rule </VirtualHost>

 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 8

At apache, you can write a rewrite rule, which redirects to your custom 404 error page.

 

<VirtualHost *:80>
   ErrorDocument 404 /custom_404.html
// rewirte rule </VirtualHost>

 

Avatar

Level 2

We do have different vhost for our webssites and rewrite rules.

 

Our requirement is redirect to error page only if the path is "/libs/granite/core/content/login.html"

 

I have added a redirect condition that if the URI matches to this path then redirect to error page but it's not working.

Avatar

Community Advisor

Hi @Antony6790 

 

Would you check if this page is cached on diaptcher or not? Because if the page is cached, even though you deny that page in dispatcher filter, that does not work.

 

When request comes, dispatcher first find page in docroot directory for cache files, if it finds the requested resource, it checks if page is not stale and if not, it returns from cache. But if the page is not present, only then it goes to dipatcher any file to match the request with filters.

 

Let me know if it works for you.

Thanks,

Nupur