AEM 6.3: Bad Request when replacing dot in selector for slash

Avatar

Avatar

Jeanmaradiaga

Avatar

Jeanmaradiaga

Jeanmaradiaga

16-02-2021

I am trying to make my product details page have the following format: 

https://stage.aemsite.com/en/product-details/some-product

 

We use selectors for our product details so I understand AEM won't be able to interprete this, my idea was to use the dispatcher to allow a passthrough to the correct format https://stage.aemsite.com/en/product-details.some-product, but this is resulting in a bad request. I tested this on https://technicalseo.com/tools/htaccess/ and it should technically work.

 

 

RewriteCond %{REQUEST_URI} ^/([a-z]{2})/product-details/([^?]*)(/?)$
RewriteRule ^ https://%{SERVER_NAME}/%1/product-details.%2 [PT,L,NC]

 

Any idea?

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883
Arun_Patidar
MVP

16-02-2021

Check your webserver settings the urls may be blocked. If the client is sending a request to an invalid URL — particularly one that is malformed via improper characters — this could result in a 400 Bad Request Error.

Is request reaching to AEM or Dispatcher or it is blocked by Apache server itself?