I have followed all the steps from adobe document
https://experienceleague.adobe.com/docs/experience-manager-learn/ams/dispatcher/disp-vanity-url.html...
vanity url config ex:
page path: /content/brandx/us/en/headerpages/test/test-page.html
in this page property I have configured vanity url as /test-page so it should serve as domainname/test-page.html but it's throwing 404 in both publish & dispatcher which is working perfectly in author instance.
I have checked vanity url list under this path its showing in both publish&dispatcher link
/libs/granite/dispatcher/content/vanityUrls.html
vanity url is working: whenever I am prefixing "/content" [/content/test-page]
vanity url not working: whenever I am configuring without "/content" [test-page]
Kindly, help me with this to fix asap. Thanks in advance!
Views
Replies
Total Likes
Please enable the following log levels. That would help you in debugging
Define DISP_LOG_LEVEL info Define REWRITE_LOG_LEVEL trace2 |
Please verify if any rewrite rule is interfering and resolving to this behaviour
RewriteCond %{REQUEST_URI} !^/apps
RewriteCond %{REQUEST_URI} !^/content
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/tmp
RewriteCond %{REQUEST_URI} !^/var
RewriteCond %{REQUEST_URI} !^/bin/
RewriteCond %{REQUEST_URI} !^/system/sling/logout
RewriteCond %{REQUEST_URI} !^/BingSiteAuth.xml
RewriteCond %{REQUEST_URI} !^.*sitemap\.xml
RewriteCond %{REQUEST_URI} !^/google
RewriteRule ^/(.*)$ /content/brands/brandone/us/en/$1 [PT,L]
this is our project rewrite rule
Hi,
If you can hit the vanityUrl prefixing "content" most likely the issue is with your rewrite rules, please check this article which is the cloud version of the one you shared and explains how the resolution works at the dispatcher level: https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-17463.html?lang=en#resolu...
Yes, I know the issue. Since I have written dispatcher rewrite rule like this
RewriteRule ^/(.*)$ /content/brands/brandone/us/en/$1 [PT,L]
so it will do internal search like below only tha's why throwing 404 error
note:test-page is a vanity url
/content/brands/brandone/us/en/test-page
I would like to know what will be solution for this? I should add /content/ or any other solution?
Your current rewrite rule (RewriteRule ^/(.*)$ /content/brands/brandone/us/en/$1 [PT,L]
) rewrites all requests starting with /
to a specific pattern. This is conflicting with your vanity URL for /test-page
, as the dispatcher tries to rewrite it to /content/brands/brandone/us/en/test-page
which doesn't exist.
Solutions:
RewriteRule ^/test-page$ /content/brands/brandone/us/en/test-page.html [PT,L]
| This only rewrites /test-page
to the correct target path, leaving other requests untouched.RewriteRule ^/(.*)$ /content/brands/brandone/us/en/$1 [PT,L]
| This captures the vanity URL name (e.g., "test-page") and inserts it into the target path, dynamically handling any vanity URL./libs/granite/dispatcher/content/vanityUrls.html
list. Add your test-page
URL to this list.Views
Replies
Total Likes
Any solutions Folks? It's not even working in publish url
Views
Replies
Total Likes
The possible reasons why your vanity URL might not be working:
/
through the Dispatcher because that's the root of the JCR tree. Make sure that the filters are not blocking the vanity URL. You can check the configuration of the filters in the Dispatcher farm file./libs/granite/dispatcher/content/vanityUrls.html
file on the publish server.In addition to the above, here are some other things you can check:
Views
Replies
Total Likes
@jeromeleslyv Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies