Réponse 403 Forbidden pour des images en utilisant le répartiteur

La réponse 403 Forbidden s'affiche pour les images en utilisant le répartiteur, un / étant également ajouté à la fin du nom dans l'URL.

Environnement

  • AEM
  • Apache
  • Répartiteur 

Cause

La barre oblique supplémentaire est due au module mod_dir d’Apache qui ajoute / à une URL de requête correspondant à un répertoire.

Résolution

Définir la directive DirectorySlash dans le module Apache mod_dir :
<Directory />
<IfModule disp_apache2.c>
# enable dispatcher for ALL request if this is too restrictive,
# move it to another location
# RequestHeader add uid "admin"
DirectorySlash Off
SetHandler dispatcher-handler
</IfModule>
Options FollowSymLinks
AllowOverride None
</Directory>

Informations supplémentaires

Directive DirectorySlash http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryslash Interference with Mod_Dir (Apache) https://docs.adobe.com/docs/fr/dispatcher/disp-tshoot.html#Interference with mod_dir (Apache)

Logo Adobe

Accéder à votre compte