Hello Everyone,
1. Our project structure is like /content/project-name/home is the root path and inside this there are 4 parent level pages like product1, product2, product3 etc.
2. For one of the page inside /content/project-name/home/product1 say /content/project-name/home/product1/sample-page, our authoring team is using vanity url like this: /product1/product-feature/investment/planning (this page was created earlier and later it deleted/moved. But still they want the reference/bookmark to work as is and thats why they are setting /product1/product-feature/investment/planning as vanity url for above sample page)
3. When we access a page with this vanity : host/product1/product-feature/investment/planning
its going to 404 page. This is because its conflicting with our redirect rule which we have written for content resolution:
RewriteCond %{REQUEST_URI} ^/(product1|product2|product3)(.*)
RewriteRule ^/(.*)$ /content/${CONTENT_FOLDER_NAME}/home/${tolower:$1}.html [PT,L]
4. Out authoring team is expecting that this vanity: /product1/product-feature/investment/planning should point to /content/project-name/home/product1/sample-page which is not working
5. We suggested them to add rewrite rules for such cases but they are not agree with this as adding rewrite rule will need frequent deployment.
We are not sure if this is correct way of adding such long vanity urls for any deleted or moved pages. Please guide us on recommended way of using vanity urls. @aanchal-sikka @arunpatidar
Views
Replies
Total Likes
Hi @supriya-hande
Please check this https://adapt.to/2023/schedule/tenant-specific-vanity-urls-with-aem
@arunpatidar Thanks for your quick reply. I already checked that link but that scenario is for multiple domains. In our case we have only one website. We want this vanity url: /product1/product-feature/investment/planning should work but its conflicting with rewrite rule written for content resolution and its going to 404 because this rewrite rule also adds /content/${CONTENT_FOLDER_NAME}/home before vanity path which becomes wrong path. That means our normal page url(/product1/planning/test-page) and vanity path(/product1/product-feature/investment/planning) both starts with /product1 and its resolving to wrong path for vanity because of this rewrite rule. I hope this will give more clarification on that issue.
Could you please confirm if this is correct way of using vanity urls?
Hi @supriya-hande
Could you please verify the requests received on the AEM side and review the request logs for vanity page request? If AEM is not receiving the correct requests, it may be necessary to reconsider the rewrite rule to ensure it does not conflict with standard rules.
Hi @supriya-hande Authors can select the Redirect Vanity URL checkbox when adding Vanity URL entries, this causes vanity urls to behave as 302 redirects. It means that the browser is told to go to the new URL (via Location response header) and the browser makes a new request to the new URL.
@aanchal-sikka your thoughts on this please?
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies