<IfModule mod_rewrite.c> ReWriteEngine on LogLevel warn rewrite:info # Global rewrite include Include conf.d/rewrites/base_rewrite.rules <If "%{REQUEST_URI} =~ m#^/content/abc#"> Include conf.d/rewrites/abc_rewrite.rules </If> <ElseIf "%{REQUEST_URI} =~ m#^/content/xyz#"> Include conf.d/rewrites/xyz_rewrite.rules </ElseIf> </IfModule>
init rewrite engine with requested uri /content/abc/in/en/home/test.html pass through /content/abc/in/en/home/test.html [perdir *If/] add path info postfix: /mnt/var/www/html/content -> /mnt/var/www/html/content/abc/in/en/home/test.html [perdir *If/] applying pattern '(.*)' to uri '/mnt/var/www/html/content/abc/in/en/home/test.html' [perdir *If/] pass through /mnt/var/www/html/content
Views
Replies
Total Likes
Can you please let us know your requirement?
Looks like you are trying to handle 2 different domain rewrites here. If that's true then your implementation approach is not right. Create 2 Vhosts and let each host include rewrite files dedicated to them -[0].
Anyway, you can refer apache expressions guide to put right conditional statement- [1]. Issue with your statement seems with regex-
m#^/content/abc#
Can you just try m#/content/abc/# or /content/abc/
Also, please be aware that if you are on AEM cloud service- it does not support direct inclusion of custom rewrite file names- [2].
Hi @vivekanand-mishra ,
As per the condition mentioned it seems like they do have two rewrite rules working with different content paths respectively.
And both of the content paths will use same domain.
Views
Likes
Replies