AEM stage site with htaccess incure redirecting url issue | Community
Skip to main content
HuodongYuan
New Participant
Sep 5, 2020 11:11 AM UTC
Solved

AEM stage site with htaccess incure redirecting url issue

For the sake of security, our security team put our AEM 6.1 stage site under htaccess authentication protection.

But, after entered the correct credentials the stage site is redirecting to url like this "http://stage.sample.com/content/geometrixx/en/toolbar/account/login.html?resource=%2Fcontent%2Fufs%2Fzh.html&$$login$$=%24%24login%24%24&j_reason=User+name+and+password+do+not+match&j_reason_code=invalid_login", and given below error.

This redirected url looks like related to AEM. How can I avoid the url redirecting and get htaccess the authentication pass? Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
AlbinIs1Accepted solution
Level 2
Sep 5, 2020 5:31 PM UTC

Try un-setting the basic authentication before sending the request to AEM 

Enable some configuration like below in virtual-host

<Location />
## unsets authorization header when sending request to AEM
RequestHeader unset Authorization
Deny from all
AuthUserFile /etc/httpd/conf.d/htaccess/uat_dispatcher.htaccess
AuthName "Authentication Required"
AuthType Basic
Satisfy Any
require valid-user
</Location>

Regards

Albin I

www.albinsblog.com

3 replies

AlbinIs1Accepted solution
Level 2
Sep 5, 2020 5:31 PM UTC

Try un-setting the basic authentication before sending the request to AEM 

Enable some configuration like below in virtual-host

<Location />
## unsets authorization header when sending request to AEM
RequestHeader unset Authorization
Deny from all
AuthUserFile /etc/httpd/conf.d/htaccess/uat_dispatcher.htaccess
AuthName "Authentication Required"
AuthType Basic
Satisfy Any
require valid-user
</Location>

Regards

Albin I

www.albinsblog.com

Translate
HuodongYuan
New Participant
Sep 15, 2020 1:34 PM UTC
Thanks. This is helpful.
Translate
Shashi_Mulugu
New Participant
Sep 5, 2020 12:07 PM UTC

@huodongyuan thank you for posting in Communities. Based on your post, you are trying to implement htaccess authentication in stage publisher.. so what is the redirect url you have configured in htacess? Is it the same URL user hit or some standard URL? Also are you able to hit same page via Publisher ip or domain? 

Translate