Can redirect a page to a page with alias name?

Avatar

Avatar
Level 1
gayatrik8153299
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
gayatrik8153299
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

0 solutions
View profile
gayatrik8153299
Level 1

25-08-2020

Hi All,

We have a page where we have configured the alias name but page is not redirecting with alias name.

We are using AEM 6.4.5 version

Ex: page1 has configured alias name as page1-alias

when we hit the page with /page1.html it should redirect to /page1-alias.html but its not working.

We tried clearing the dispatcher cache and provided the root level access to anonymous user as well but still not working.

But when we direct hit the alias page is working(/page1-alias.html)

Could you please let us know whether can redirect a page to a page with alias name.

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 1
Level 4
Andrei_Dantsou
Level 4

Likes

35 likes

Total Posts

29 posts

Correct reply

14 solutions
Top badges earned
Ignite 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Ignite 1
Level 4
Andrei_Dantsou
Level 4

Likes

35 likes

Total Posts

29 posts

Correct reply

14 solutions
Top badges earned
Ignite 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Andrei_Dantsou
Level 4

25-08-2020

Hello @gayatrik8153299 ,

If your goal is redirection from /page1.html to /page1-alias.html, then you should use the Rewrite Rule directive:

RewriteRule /page1.html /page1-alias.html [R=301,L] - for 301 redirect (the path shown in browser will be /page1-alias.html) or

RewriteRule /page1.html /page1-alias.html [PT] (the path shown in browser will be /page1.html)

https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#rewriterule
https://httpd.apache.org/docs/2.4/rewrite/flags.html

The alias in the "Page Properties > Advanced" makes the page accessible via the different name. For instance if the alias for the page /content/we-retail/language-masters/en/experience/skitouring.html is set to "skitouring-alias", then the page will accessible via the /content/we-retail/language-masters/en/experience/skitouring-alias.html url as well, so the behavior you've described appears to be expected.

Regards

Answers (4)

Answers (4)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

25-08-2020

Addition to Andrei_Dantsou

You can try using vanity URLs with redirect vanity url property to redirect user to different page. but check below post before using vanity urls

https://blog.3sharecorp.com/enabling-vanity-urls-with-adobe-experience-manager

Avatar

Avatar
Give Back
Level 2
harishv63553358
Level 2

Likes

7 likes

Total Posts

7 posts

Correct reply

2 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Give Back
Level 2
harishv63553358
Level 2

Likes

7 likes

Total Posts

7 posts

Correct reply

2 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
harishv63553358
Level 2

25-08-2020

hi @gayatrik8153299 small tip, usually we get these kind of issues with vanity conflicts. Please double check. 

You can use this package to fetch all the vanity list on your instance. https://downloads.experiencecloud.adobe.com/content/software-distribution/en/pswelcome.html?packageP...

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,141 likes

Total Posts

3,167 posts

Correct reply

1,084 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,141 likes

Total Posts

3,167 posts

Correct reply

1,084 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

25-08-2020

Hi,

So you want that if you specify page1.html as target page, the alias value is used instead of the page name (if the alias is configured)? IIRC that's not default, but it should be doable using a custom rewriter.

Avatar

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

251 likes

Total Posts

262 posts

Correct reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

251 likes

Total Posts

262 posts

Correct reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile
Nikhil-Kumar
MVP

25-08-2020