Expand my Community achievements bar.

SOLVED

Issue with AEM as a Cloud page redirection: Redirecting to /content.html after deploying system generated repository on AEM as a cloud DEV server

Avatar

Employee Advisor

Hello,
I am facing one issue on my cloud dev instance. I have created a deployment pipeline using the default repository on Cloud Manager. It is created using the latest archetype.

The deployment is successful. when I am trying to access the domain for publish with dispatcher, It is redirecting me to /content.html page instead of loading the /us/en.html page. When i am cloning the code from the repository, I see the correct dispatcher rule is present. 

This is a deployment without any custom code. Just deploying the system created repository to dev cloud. Not sure why the created dispatcher rules are not executing properly.

Please let me know if I am missing something here.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Indeed. I would now start to enable mod_rewrite debugging to see if this rule is checked at all.

View solution in original post

9 Replies

Avatar

Employee Advisor

So did you let the CM bootstrap the archetype for you or did you do it manually? Which version were you using?

And what do you mean with "the correct dispatcher rule is present"? 

Avatar

Employee Advisor

I did let the CM bootstrap the archetype. By correct dispatcher rule I mean, the one comes with the project setup:

RewriteRule ^/?$ /content/${CONTENT_FOLDER_NAME}/us/en.html  [PT,L]

but somehow it is not getting triggered. No manual customization at all.

Avatar

Employee Advisor

When I check the current version of the archetype, the default rewrite points to /index.html, see here.

 

 

Avatar

Employee Advisor

actually there is an include of rules just before that line:

Include conf.d/rewrites/rewrite.rules

and this file contains the redirection to home page which is:

RewriteRule ^/?$ /content/${CONTENT_FOLDER_NAME}/${country}/${language}.html [PT,L]

 

So ideally it should redirect to us/en.html with PT flag, which is my issue. Why this redirection is not happening and its going to index.html

Avatar

Correct answer by
Employee Advisor

Indeed. I would now start to enable mod_rewrite debugging to see if this rule is checked at all.

Avatar

Employee

Can you replicate this issue on your local dispatcher sdk setup ?

 

Also, Switch on the debug logs for dispatcher + trace level logging for the rewrite engine so it surfaces whats actually happening on your dispatcher module and creating this problem

 

Share the debug logs if you can here

Avatar

Employee Advisor

Not able to replicate this on local sdk. Local sdk works as expected.

Let me share the logs in a while.

Avatar

Administrator

@Anish-Sinha 

[Webinar | AEM GEMs] Looking under the hood - Cloud Manager 2022 | Register: https://adobe.ly/3t4jfgp  & Ask Questions related to this Webinar: https://adobe.ly/3O0rdzd 

Date &Time: Wednesday, June 15, 2022 - 8 am PDT OR 5 pm CET OR 8.30 pm IST
Speakers: Remus Stratulat & Shankari Panchapakesan

Share this within your Organisation and with your AEM peers!!



Kautuk Sahni