Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Regarding Vanity URLS

Avatar

Avatar
Validate 10
Level 2
veerareddyc2547
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
veerareddyc2547
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
veerareddyc2547
Level 2

05-06-2016

Hi,

we have a two domains like plan.rajasthan.gov.in,energy.rajasthan.gov.in
i want to use vanity url "/department" for both domain name redirecting to diffrent sites 
(ex:-plan.rajasthan.gov.in/department redirect to it inner webiste as planning department and energy.rajasthan.gov.in/department redirect to it inner webiste as energy department ) can we config same vanity name for two diffrent webistes redirecting to diffrent sites .if possible please help us to resolve this problem.

 

Thanks,

Veera 

Replies

Avatar

Avatar
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct Reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile

Avatar
Validate 25
MVP
bsloki
MVP

Likes

182 likes

Total Posts

1,859 posts

Correct Reply

545 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 50
Boost 5
View profile
bsloki
MVP

06-06-2016

It should work. Configure the vanity url as '/department' in the page properties of the respective pages.

Hope, both the subdomains are different sites in AEM and the same has been configured in dispatcher.

Avatar

Avatar
Validate 1
Employee
Opkar_Gill
Employee

Likes

138 likes

Total Posts

952 posts

Correct Reply

280 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Employee
Opkar_Gill
Employee

Likes

138 likes

Total Posts

952 posts

Correct Reply

280 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
Opkar_Gill
Employee

06-06-2016

Hi,

I don't think this will be possible, Try it yourself with the gemoetrixx sites. 

if you consider an AEM instance with many sites, then all the vanity URL's are stored together, not per site, so if you define two vanity urls with the same value, you cannot guarantee which path will be resolved. 

There are at least two ways in which you could address this: prepending a identifier to the vanity url, or handling incoming requests for vanity url's at the dispatcher level:

Using the prefix method, for all vanity URL's the authors must add a prefix, so in your case you would use: "/plan/department" and "/energy/department".

If you wanted to do this at the dispatcher level, you would have to add a rule for the specific vanity URL, so that when the URL "/department" comes into the dispatcher configuration for "plan.rajasthan.gov.in"It gets resolved to a path for the plan site. The big issue with this is that authors cannot set the vanity url themselves, they have to get the development team to add a tule for every vanity url directly in the dispatcher config.

Regards,

Opkar

Avatar

Avatar
Boost 3
Level 2
Ashokkumar_TA
Level 2

Likes

3 likes

Total Posts

21 posts

Correct Reply

3 solutions
Top badges earned
Boost 3
Boost 1
Affirm 3
Affirm 1
View profile

Avatar
Boost 3
Level 2
Ashokkumar_TA
Level 2

Likes

3 likes

Total Posts

21 posts

Correct Reply

3 solutions
Top badges earned
Boost 3
Boost 1
Affirm 3
Affirm 1
View profile
Ashokkumar_TA
Level 2

06-06-2016

One way is to give authors a convention to follow for vanity url's - Say prefix dept name before vanity path so that authors can define vanity paths as 
for page plan.rajasthan.gov.in/department - plan/department & 
for page energy.rajasthan.gov.in/department - energy/department

You can then use dispatcher to rewrite plan.rajasthan.gov.in/department to map to plan/department & energy.rajasthan.gov.in/department to map to energy/department

Avatar

Avatar
Validate 10
Level 2
veerareddyc2547
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
veerareddyc2547
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
veerareddyc2547
Level 2

08-06-2016

hi

    Thank you reverting me on my previous mail please let me know where should i add  rewriterule, Please find below  my httpd.vhosts.conf  file

<VirtualHost *:80>
    ServerAdmin webmaster@plan.rajasthan.gov.in
    
    ServerName plan.rajasthan.gov.in
    ServerAlias www.plan.rajasthan.gov.in
    
    DocumentRoot "/rajasthan/cache"
    
        # rewrite log
    #RewriteLog "logs/rewrite-http-plan.log"
    #RewriteLogLevel 9

    RewriteEngine On


     # If we have a request for the root URL /
     # we redirect to the en language version of a home page with a HTTP 301
     RewriteRule     ^/$    /content/planning-portal/en.html   [R=301,L]
    
    #ErrorLog "logs/plan.rajasthan.gov.in-error.log"
    #CustomLog "logs/plan.rajasthan.gov.in-access.log" common
</VirtualHost>

and this is my vanitypath config:   /00364 {/type "allow" /glob "* /department*"}

Avatar

Avatar
Validate 10
Level 2
veerareddyc2547
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
veerareddyc2547
Level 2

Likes

5 likes

Total Posts

36 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
veerareddyc2547
Level 2

08-06-2016

hi

    Thank you reverting me on my previous mail please let me know where should i add  rewriterule, Please find below  my httpd.vhosts.conf  file

<VirtualHost *:80>
    ServerAdmin webmaster@plan.rajasthan.gov.in
    
    ServerName plan.rajasthan.gov.in
    ServerAlias www.plan.rajasthan.gov.in
    
    DocumentRoot "/rajasthan/cache"
    
        # rewrite log
    #RewriteLog "logs/rewrite-http-plan.log"
    #RewriteLogLevel 9

    RewriteEngine On


     # If we have a request for the root URL /
     # we redirect to the en language version of a home page with a HTTP 301
     RewriteRule     ^/$    /content/planning-portal/en.html   [R=301,L]
    
    #ErrorLog "logs/plan.rajasthan.gov.in-error.log"
    #CustomLog "logs/plan.rajasthan.gov.in-access.log" common
</VirtualHost>

and this is my vanitypath config:   /00364 {/type "allow" /glob "* /department*"}

Avatar

Avatar
Boost 1
Level 1
navazc52395821
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
navazc52395821
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
navazc52395821
Level 1

01-08-2018

HI,

i'm facing the issue in the vanity url. Looking for the permanent Fix.

When users use vanity urls when they are not logged in they get redirected to an error page instead of the login page.
Users should be redirected to the login page and then the event page if not logged in. If users are logged in it should redirect them directly to the event page

Avatar

Avatar
Give Back 50
Employee
Kunwar
Employee

Likes

65 likes

Total Posts

253 posts

Correct Reply

72 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Kunwar
Employee

Likes

65 likes

Total Posts

253 posts

Correct Reply

72 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Kunwar
Employee

02-08-2018

This feature isn't available in the product yet but you may use the following approach to complete this requirement

  • Add an extra field in the page properties instead of sling:vanityPath
  • Using that field they add /content/siteA to the front of the sling:vanityPath before saving it to the sling:vanityPath property
  • This would distinguish between content hierarchy for multiple sites
  • Configure the rewrite rules in accordance to the setting above See (1)

(1) : https://www.cognifide.com/our-blogs/cq/multidomain-cq-mappings-and-apache-configuration