Issue in Dispatcher Rewrite rule

sureshr5604

18-02-2019

Hi Guys

when I request the URL it should go to the requested path but it redirected to below URL and it comes with '/' in the end instead of

'.html'

Requested path : https://<DOMAIN-URL>/en/ENV/products/television.just_parsys.html (301)

Redirected to: https://<DOMAIN-URL>/en/ENV/products/television.just_parsys/
(trailing slash appended) (404)


Please give me some solution.

Accepted Solutions (1)

Accepted Solutions (1)

Gaurav-Behl

MVP

18-02-2019

check if DirectorySlash is turned off or not  -- this would take care of the trailing slash in webserver assuming apache in this context.

mod_dir - Apache HTTP Server Version 2.4

Does this redirect happen from apache-redirect rules or AEM-sling mappings? Could you share appropriate logs?

Could you share the httpd.conf/rewrite rules/dispatcher.any as applicable in this use case?

Answers (2)

Answers (2)

sureshr19072451

03-04-2019

It would be helpful if you can post what solved your problem with some details.

Note: on turning off DirectorySlash -

# see security warning below! <Location "/some/path"> DirectorySlash Off SetHandler some-handler </Location>

Security Warning

Turning off the trailing slash redirect may result in an information disclosure. Consider a situation where mod_autoindex is active (Options +Indexes) and DirectoryIndex is set to a valid resource (say, index.html) and there's no other special handler defined for that URL. In this case a request with a trailing slash would show the index.html file. But a request without trailing slash would list the directory contents.