AEM Dispatcher not resolving vanity urls | Community
Skip to main content
daitienshi
Level 2
Aug 21, 2017 5:51 PM UTC
Solved

AEM Dispatcher not resolving vanity urls

Hi there,

I'm trying to set up our dispatcher to resolve the vanity urls we have set up in our publisher.  However, after following the configuration guide, when I try to hit a vanity url, I'm getting a 404 error rather than the page itself.

Here's a snippet from our dispatcher.any configuration:

Here's what I see in the dispatcher.log when I try to hit my vanity url:

It looks like it's trying to get to the /home vanity url after the filter rejects it, but nothing ever shows up.  When I look at the access.log on the publisher, I don't see any requests for the vanityUrls.html from the dispatcher.

Any help you could provide would be much appreciated!

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
daitienshi
daitienshiAccepted solution
Level 2
Aug 23, 2017 12:22 PM UTC

I believe this is now fixed. It turns out the documentation on the dispatch configuration (Configuring Dispatcher - docs.adobe.com ) has a typo in the first example configuration, where it lists the entry as "/vanity-urls".  However, later on in the vanity urls section (https://docs.adobe.com/content/docs/en/dispatcher/disp-config.html#Enabling Access to Vanity URLs - /vanity_urls), it's listed as "/vanity_urls".  The proper configuration is indeed with the underscore and not the hyphen (i.e. /vanity_urls). 

5 replies

daitienshi
daitienshiAuthorAccepted solution
Level 2
Aug 23, 2017 12:22 PM UTC

I believe this is now fixed. It turns out the documentation on the dispatch configuration (Configuring Dispatcher - docs.adobe.com ) has a typo in the first example configuration, where it lists the entry as "/vanity-urls".  However, later on in the vanity urls section (https://docs.adobe.com/content/docs/en/dispatcher/disp-config.html#Enabling Access to Vanity URLs - /vanity_urls), it's listed as "/vanity_urls".  The proper configuration is indeed with the underscore and not the hyphen (i.e. /vanity_urls). 

Translate
kautuk_sahni
Employee
Aug 23, 2017 8:42 AM UTC

Jörg Hoh Any hey here?

~kautuk

Translate
Kautuk Sahni
daitienshi
Level 2
Aug 22, 2017 6:12 PM UTC

Looking at the dispatcher log, I'm seeing that the vanity-urls entry in the dispatcher.any file is not being recognized.

That would explain why it's not making the call to the publisher.  Any reason you can think of as to why this warning is showing?

Translate
daitienshi
Level 2
Aug 22, 2017 12:30 PM UTC

- I'm able to access the vanity urls if I bypass the dispatcher and go straight to the Publisher.  I know it has something to do with the webserver config but just trying to see what it could be.

- how would I switch off the mod_rewrite to do the quick test? Based on the dispatcher log, it seems like it's trying to go to my vanity url (/home) even after the filter, so it seems like it's checking the vanity urls file.  However, like I said, the access.log on the publisher never shows the dispatcher getting the vanityUrls.html from it.

Translate
Employee
Aug 21, 2017 8:21 PM UTC

Few things to check :

- Bypass the dispatcher and see if the vanity urls work or not ? If they do, issue lies on the webserver configuration

- Hit the vanity url via the dispatcher and check if any rewrite rules are changing the url before it actually goes to the dispatcher

- Quick test would be switch off the mod_rewrite and see if the vanity urls work or not ?

Translate