Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!

Custom rewrite files not found error while including in vhost file

Avatar

Level 4

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

7 Replies

Avatar

Community Advisor

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

Avatar

Level 4

@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 

Avatar

Community Advisor

HI @smahesh 

Could you please check 

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/con... 

 

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

Avatar

Level 4

@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 

Avatar

Administrator

@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

Avatar

Level 4

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

 

Thanks

Mahesh 

Avatar

Administrator

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



Kautuk Sahni