Expand my Community achievements bar.

SOLVED

' / ' is getting appended to the URL while accessing PPTX docs

Avatar

Level 4

While access a PPTX docs in AEM a ' / ' is getting appended to the URL. While the same docs can be opened in PDF format.  The issue is happening while accessing the file through dispatcher. We are using AEM 5.6.1

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi

I have found a documentation stating URL Fixup by Apache 2.X,

Apache 2.x

In Apache 2.x things are different. A module can handle different stages of the request, such as URL fixup.mod_dir handles this stage by redirecting a request (when the URL maps to a directory) to the URL with a/ appended.

Dispatcher does not intercept the mod_dir fixup, but completely handles the request to the redirected URL (i.e. with / appended). This might pose a problem if the remote server (e.g. AEM) handles requests to/a_path differently to requests to /a_path/ (when /a_path maps to an existing directory).

If this happens you must either:

  • disable mod_dir for the Directory or Location subtree handled by the dispatcher
  • use DirectorySlash Off to configure mod_dir not to append /
  •  

I hope this would help you.

Thanks and Regards 

Kautuk Sahni



Kautuk Sahni

View solution in original post

5 Replies

Avatar

Level 10

Is it specific to pptx files ??

and if its happening only via dispatcher, do you have any rules to '/' for any regex ?

Avatar

Correct answer by
Administrator

Hi

I have found a documentation stating URL Fixup by Apache 2.X,

Apache 2.x

In Apache 2.x things are different. A module can handle different stages of the request, such as URL fixup.mod_dir handles this stage by redirecting a request (when the URL maps to a directory) to the URL with a/ appended.

Dispatcher does not intercept the mod_dir fixup, but completely handles the request to the redirected URL (i.e. with / appended). This might pose a problem if the remote server (e.g. AEM) handles requests to/a_path differently to requests to /a_path/ (when /a_path maps to an existing directory).

If this happens you must either:

  • disable mod_dir for the Directory or Location subtree handled by the dispatcher
  • use DirectorySlash Off to configure mod_dir not to append /
  •  

I hope this would help you.

Thanks and Regards 

Kautuk Sahni



Kautuk Sahni

Avatar

Level 2

Hi @kautuksahni​/ @ranadyutis95334917,

I'm new in dealing with dispatcher issues.
We have a similar issue with the dispatcher. We updated the apache configuration as suggested and restarted the apache. Do we need to clear cache apart from the restart to solve this issue?

Thanks,
Hemanth

Avatar

Level 4

Yes, please clear the cache. also after making dispatcher changes please restart apache in order to make the change effective.