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

Getting 403 response from AEM for requests with no html extension

Avatar

Avatar
Validate 1
Level 3
ramgopalm545617
Level 3

Likes

8 likes

Total Posts

80 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
ramgopalm545617
Level 3

Likes

8 likes

Total Posts

80 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
ramgopalm545617
Level 3

05-06-2020

Hi,

we have already a predefined set of etc/mappings done so that both the domain can map to the content path and the path can reverse map to the domain name (which would enable shortened URL's in the live websites)

PFB set configurations from crx as the screenshot and the resource resolver configs.

 

Mapping Map Entries
Lists the entries used by the ResourceResolver.map methods to map Resource Paths to URLs

Pattern Replacement Redirect
^/content/***/en/***/ https://test.example.com/ external: 302
^/ https://test.example.com./ external: 302

 

* there is a , to the end of the mapping configuration in the below screenshot, which will create the reverse mapping to the domain

ramgopalm545617_0-1591370173137.png

 

we recently wanted to remove the .html extension and we have made necessary changes at Apache, but because of the above setup AEM is responding as below. Any suggestions to fix either mappings or a way to remove html at apache level would help us.

 

request log:

01/Jun/2020:10:44:16 -0400 [47276] -> GET /content/***/en/***/home/*****/hospitals HTTP/1.1
01/Jun/2020:10:44:16 -0400 [47276] <- 302 - 4ms
01/Jun/2020:10:44:16 -0400 [47277] -> GET /content/***/en/***/home/*****/hospitals/ HTTP/1.1
01/Jun/2020:10:44:16 -0400 [47277] <- 403 text/html 9ms

AEM mappings

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Albin_Issac
MVP

Likes

106 likes

Total Posts

119 posts

Correct Reply

33 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
MVP
Albin_Issac
MVP

Likes

106 likes

Total Posts

119 posts

Correct Reply

33 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Albin_Issac
MVP

05-06-2020

Append .html in Apache/Dispatcher before sending the request to publisher, the flow is

Dispatcher(Apache) Rule Configurations

- Remove .html extension from incoming URL with /

- Append the .html while invoking the publisher for the URL’s ending with /  - PT(PassThrough Rule)

Enable etc/map configuration in AEM

- Reverse mapping to rewrite the html URL’s (internal page links) without extension.

- Forward mapping to map the incoming request to resource

Please refer the following URL for more details  - https://medium.com/@techforum/how-to-implement-extension-less-urls-in-aem-a3136c71b232

Answers (0)