adobe / aem-project-archetype

Maven template to create best-practice websites on AEM.
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/overview.html
Apache License 2.0
544 stars 419 forks source link

Rewrites from shortened URLs missing some valid paths #1215

Open HitmanInWis opened 3 weeks ago

HitmanInWis commented 3 weeks ago

The archetype includes rewrites from shortened URLs to full URLs in https://github.com/adobe/aem-project-archetype/blob/develop/src/main/archetype/dispatcher.ams/src/conf.d/rewrites/__appId___rewrite.rules

RewriteCond %{REQUEST_URI} !^/apps
RewriteCond %{REQUEST_URI} !^/bin
RewriteCond %{REQUEST_URI} !^/content
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/home
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/saml_login
RewriteCond %{REQUEST_URI} !^/system
RewriteCond %{REQUEST_URI} !^/tmp
RewriteCond %{REQUEST_URI} !^/var
RewriteCond %{REQUEST_URI} (.html|.jpe?g|.png|.svg)$
RewriteRule ^/(.*)$ /content/${CONTENT_FOLDER_NAME}/$1 [PT,L]

Given these paths are all checked w/o a trailing / the following paths will not be rewritten to their full paths:

I believe all of these paths, with the exception of maybe /saml_login should be updated with a trailing /

HitmanInWis commented 3 weeks ago

slight addendum - would need to leave /etc as-is or if changing to /etc/ then also add /etc.clientlibs