I followed the steps outlined in the link referenced above. I used Approach-1, where AEM rewrites the URLs rather than setting up apache rewrites. Lot of the stuff works. I do see pages being cached, etc. What I'm struggling with are the resource maps that need to be setup for URL shorterning.
I'm kind of lost on what exactly needs to be done in /etc/map/http. I tried several things but nothing seems to work completely. My dispatcher renderer is pointing to hostname - "127.0.0.1" & port - "4503".
All of the documentation points to creating the maps based on domain name. It is not clear to me how the domain name is passed to the publish instance. The dispatcher is always going to request using the localhost based on the configuration I have above..
I'm missing something basic here. Am I supposed to change the hostname in the dispatcher renderer to whatever host I'm targeting?
Here is some more information about my setup.
Publish Instance URL: localhost:4503
Content Path: /content/wknd/en.html
Domain Name: dev.wknd.com
What resource maps do I need to create to shorten the urls with this setup?
Thanks for your help so far. To answer some of your questions, I'm using apache on CentOS and AEM 6.4.3. I have all of my virtual hosts configured as required, configured dispatcher, etc. Everything is working as expected. My question is only about URL shortening using resource maps in /etc/map/http.
Somehow the hundreds of blog posts on the topic including the one suggested above don't seem to work for me. It took me a while to figure out that outbound URLs are rewritten based on first match in etc/map rather than the domain being used. Anyway, I have most of it working now with the setup in the screenshot. All of the URLs are being shortened to /sports.html, /art.html, etc. The only URL that is not being shortened with this configuration is the Homepage. Homepage still points to /content/wknd/en.html.
I did setup a rewrite in apache to send dev.wknd.com -> /content/wknd/en.html.
In other words, the homepage is now accessible at both dev.wknd.com and dev.wknd.com/content/wknd/en.html which is not ideal.
Can someone let me know how to shorten the homepage url and output just '/' for the homepage link on all pages? What can I update/add to the resource map in the screenshot below to accomplish this?