Issue in Dispatcher Rewrite rule | Community
Skip to main content
New Participant
February 18, 2019
Solved

Issue in Dispatcher Rewrite rule

  • February 18, 2019
  • 3 replies
  • 3166 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gaurav-Behl

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?

3 replies

sureshr19072451
New Participant
April 3, 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.

New Participant
February 21, 2019

Thanks Gaurav for the reply.

Directory Slash we are not using,  But we found  like some other rules is blocking and corrected.  Thanks

Gaurav-Behl
Gaurav-BehlAccepted solution
New Participant
February 18, 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?