adobe / adobe/aem-project-archetype
Rewrites from shortened URLs missing some valid paths
- Dominant language
- JavaScript
- Stars
- 596
- Forks
- 431
- Avg merge
- 10d 6h
- Merged PRs (30d)
- 1
Description
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:
- /contents/abc.html
- /systems/abc.html
etc...
I believe all of these paths, with the exception of maybe `/saml_login` should be updated with a trailing `/`
Contributor guide
Research direction
Start with src/main/archetype/dispatcher.ams/src/conf.d/rewrites/__appId___rewrite.rules and review the RewriteCond exclusions for paths without a trailing slash. Verify that shortened paths such as /contents/abc.html and /systems/abc.html are rewritten to their full paths, while the intended exclusions, including the possible /saml_login exception, remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- apache
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100