Custom rewrite files not found error while including in vhost file | Community
Skip to main content
Level 3
January 11, 2025

Custom rewrite files not found error while including in vhost file

  • January 11, 2025
  • 3 replies
  • 1123 views

Hi All,

 

Please help me to get this solved . I am using  Adobe Experience Manager 2024.11.18598.20241113T125352Z-241100 version and aem-sdk-dispatcher-tools-2.0.232-windows dispatcher for my local development. The problem is i have many custom rewrite files and when i include them in vhost file i get this error " conf.d\enabled_vhosts\abc.vhost:25: included file (conf.d\rewrites\xyz_rewrite.rules) does not match any known file" even though the file exists and there is no naming/spell error. Also i can see it has this opt-in folder so there is no legacy issue .

 

I am using a window system. please help me to solve this @arunpatidar 

 

 

Regards,

Mahesh

3 replies

MukeshYadav_
Community Advisor
Community Advisor
January 13, 2025

Hi @smahesh ,

We need to include under available_vhosts folder not under enabled_vhosts where these are associated with soft link.

You may add inside dispatcher/src/conf.d/available_vhosts/project.vhost like below

<IfModule mod_rewrite.c> ReWriteEngine on LogLevel warn rewrite:info Include /etc/httpd/conf.d/rewrites/base_rewrite.rules Include /etc/httpd/conf.d/rewrites/project_specifc_rewrite.rules </IfModule>

Thanks

smaheshAuthor
Level 3
January 14, 2025

@mukeshyadav_ , this is not the case even if you don't create symlink and put your vhost file in enable_vhost folder it works without any error which is already deployed to cloud and working fine. The issue is it doesn't work I mean the same set up does not work in windows machine and gives the file not found error, even though the file is present. 

 

Thanks for replying.

 

 

Regards,

Mahesh 

arunpatidar
Community Advisor
Community Advisor
January 13, 2025

HI @smahesh 

Could you please check 

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/content-delivery/validation-debug-legacy 

 

If your project’s Dispatcher configuration does not include the file opt-in/USE_SOURCES_DIRECTLY. As a result, it has limitations around the number and size of files, such as:

  • a single rewrite file that must be used rather than files that are site-specific.
  • the sum of the contents of the customizable files must be less than 1 MB.
Arun Patidar
smaheshAuthor
Level 3
January 14, 2025

@arunpatidar thank you for replying, however I have already mentioned that we are using the opt-in/USE_SOURCES_DIRECTLY folder in our dispatcher so that is not the problem. Moreover the same set up is deployed In cloud and working fine without any error.

 

This is happening in windows machine which I have observed.

 

Regards,

Mahesh 

kautuk_sahni
Community Manager
Community Manager
January 29, 2025

@smahesh Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
smaheshAuthor
Level 3
January 29, 2025

@kautuk_sahni it didn't work when I checked last time. This is happening in windows system only.

 

Thanks

Mahesh 

kautuk_sahni
Community Manager
Community Manager
January 30, 2025

In that case, I would recommend creating a Support ticket to debug this more. 

Kautuk Sahni