I'm running into an issue with the dispatcher validator complaining that my custom rewrite file is not found and curious if anyone has had a similar issue.
This is a pretty basic setup so far as the project is just getting going. It is for a new AEMaaCS impl so no conversions from old Apache/Dispatcher configs.
We have copied the default.vhost file and renamed appropriately and created a symlink to the file in the enabled_vhosts folder.
In the vhost file we have the following include:
in the conf.d/rewrites folder created a client_rewrite.rules file and place some basic rewrites for the homepage.
When running the validator (Version 2.0.32) it stops and says this file cannot be found.
I've verified the file exists and is properly named, verified the file permissions and that the file can be read.
If we change the include and file name to just rewrite.rules the file is found and everything works fine. Changing the include and filename to anything else causes the file to not be found.
It seems like the validator simply does not like rewrite files named something other than the default rewrite.rules. Are multiple rewrite files not allowed anymore?
@bmccurdy As per the documentation.
"Currently, a single rewrite file must be used rather than files that are site-specific. As a rule, the sum of the contents of the customizable files must be less than 1MB."
Also search for "included file (…) does not match any known file" to find the error related to your issue
Here are some steps to reproduce this issue:
mvn -B archetype:generate \ -D archetypeGroupId=com.adobe.aem \ -D archetypeArtifactId=aem-project-archetype \ -D archetypeVersion=27 \ -D appTitle="My Site" \ -D appId="mysite" \ -D groupId="com.mysite" \ -D aemVersion=cloud
cp mysite/dispatcher.cloud/src/conf.d/rewrites/rewrite.rules mysite/dispatcher.cloud/src/conf.d/rewrites/my_rewrite.rules
# # This file contains the rewrite rules, and can be customized. # # By default, it includes just the rewrite rules. You can # add rewrite rules to this file but you should still include # the default rewrite rules. Include conf.d/rewrites/default_rewrite.rules Include conf.d/rewrites/my_rewrite.rules
Phase 1: Dispatcher validator Cloud manager validator 2.0.32 2021/06/14 14:59:22 conf.d/rewrites/rewrite.rules:9: included file (conf.d/rewrites/my_rewrite.rules) does not match any known file
Many clients have multiple vhosts and different rewrites/redirects that need to be implemented on a per vhost basis. Either there is something I'm doing wrong or this seems like a giant misstep.