Issue in Dispatcher Rewrite rule



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


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)




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)



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.