Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Boost 3
Level 2
Antony6790
Level 2

Likes

3 likes

Total Posts

21 posts

Correct Reply

1 solution
Top badges earned
Boost 3
Ignite 1
Give Back
Boost 1
Affirm 1
View profile

Avatar
Boost 3
Level 2
Antony6790
Level 2

Likes

3 likes

Total Posts

21 posts

Correct Reply

1 solution
Top badges earned
Boost 3
Ignite 1
Give Back
Boost 1
Affirm 1
View profile
Antony6790
Level 2

27-05-2020

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

AEM 6.5 Dispather

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

124 likes

Total Posts

203 posts

Correct Reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

124 likes

Total Posts

203 posts

Correct Reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile
raj_mandalapu
MVP

27-05-2020

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>

 

Answers (2)

Answers (2)

Avatar

Avatar
Establish
MVP
Nupur_Jain
MVP

Likes

165 likes

Total Posts

186 posts

Correct Reply

76 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Establish
MVP
Nupur_Jain
MVP

Likes

165 likes

Total Posts

186 posts

Correct Reply

76 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 25
View profile
Nupur_Jain
MVP

10-06-2020

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

Avatar

Avatar
Boost 3
Level 2
Antony6790
Level 2

Likes

3 likes

Total Posts

21 posts

Correct Reply

1 solution
Top badges earned
Boost 3
Ignite 1
Give Back
Boost 1
Affirm 1
View profile

Avatar
Boost 3
Level 2
Antony6790
Level 2

Likes

3 likes

Total Posts

21 posts

Correct Reply

1 solution
Top badges earned
Boost 3
Ignite 1
Give Back
Boost 1
Affirm 1
View profile
Antony6790
Level 2

27-05-2020

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.