Hi shiny leee,
Which version of cq?
Does anyone have the same issue? Using CQ5 single author instance to support multiple domains should be quite common.
i m not getting what you are saying by vanity url for template,
try giving relative path based on your domain to the pages using siteadmin/website console.
It should work
On each page, we can setup a list of Vanity URLs. However, right now it actually can only support URI, and one author instance can only have one unique Vanity URI.
In my case, I have two domains (e.g. one.com and two.com) which are using the single shared author instance. One and Two are just two very similiar brands. I'd like to setup one.com/shorturl and two.com/shorturl at the same time, which are correspondingly redirected to one.com/content/one/longurl and two.com/content/two/longurl.
try giving an etc/http/map where you can give regex for matching the url.
so in your regex you can include your domain name itself.
Hope this helps
You should raise a day care ticket for this.Relevent discussion http://apache-sling.73963.n3.nabble.com/URL-mapping-and-vanity-URLs-td4021126.html
But I am not sure if it was implemented. Other option I could think of is using filter to select appropriate vanity resolution based on domain name.
Yes, /etc/http/map can help but it needs IT support. Vanity URL only requires content author with basic content management skill.
A day care ticket has been raised and it says the enhanced feature will be available in a future release.
I created this thread to ask for your advice how other companies are handling this if we are facing the same situation.
Hey Shiny, I would like to have the ticket number if only you could share the same, want to track that, since i am also looking for a solution to this issue.
My other colleage raised the ticket with vendor account but I have no access to that as well. Anyway, it is somehow committed to enhance the Vanity URLs with multiple domains support in the next release.
Normaly you set the vanity url on a page with the following pattern
But then you have the problem with the mutiple domains.
But what happens in CQ if you set the vanity url. CQ sets the pattern /[^/]+/[^/]+/<myvanityurl>
what does the /[^/]+/[^/]+ mean?
It means /<protocol>/host:port/+<myvanityurl>
So I got the idea: Why not set the protocol, host and port in the vanity field
The solution look like:
On the page on one.com set the vanity like:
and on the other page in two.com set:
On my instance with multiple domains (CQ5.4) it works.
Can anybody confirm this?
Between /<protocol>/<host-port>/+/<myvanityurl> you can use regex.
So something like http://(uat|www).one.com:80/myvanityurl should also work or do two entries.
This works too.
But keep one thing in mind.
vanity pages are not cached on Dispatcher!!!
So if you use vanity url's do a redirect to the original page. It's also better for SEO.
configure on /etc/map or httpd.conf to have redirect.