URL Rewrite Rules Solution for AEM Connector

Modified on Tue, 11 Oct 2022 at 01:00 PM


What is URL rewrite in Apache?

URL rewriting purpose is to change the appearance of the URL to a more friendly URL. This modification is called URL rewriting. For example, http://example.com/form.html can be rewritten as http://example.com/form using URL rewriting.


Why do URL rewrite rules matter in Schema App AEM connector? 


This matters in AEM because markup created are applied to specific URLs, if the user calls a different URL from the one markup is mapped to, Rich Results may not be achieved. This solution enables Schema App AEM connector to support Headless AEM deployments.



How are URL rewrite rules addressed in Schema App Connector for AEM? 

  1. Below meta tag will be added in the website header <head> .. </head>, which has the value of internal AEM URL for the page.

<meta data-page-path="https://publish-p62138-e507792.adobeaemcloud.com/ content/we-retail/us/en/men"> https://www.schemaapp.com/us/en/men

<meta data-page-path="<website hostname>/<AEM internal URL>"> 

  1. Schema App Highlighter.js will read that meta tag and keep it in the schema app.

  2. When we pull CDN data from the AEM we will use that internal URL that is provided by that meta tag. Schema App will store a copy of the markup under both the public page URL as well as the internal AEM URL so both will be accessible to retrieve the JSON-LD.

  3. Once AEM scheduler receives the data from the CDN, the data will be saved in AEM content repository as 'schemaapp' node under the page the CDN API call was made. 

  4. Next time the AEM publisher receives a new request from the dispatcher with actual or rewrite URL for any page, the connector will read data from 'schemaapp' node and then add data into the <head> tag of HTML.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article