Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Dispatcher rewrite rule based on the source IP/Domain


Level 2


I have requirement to redirect the request that is coming to dispatcher (There are only two sources from which the request will come to my dispatcher, lets say they are and Dispatcher should render page1 if the request is from and page2 if the request is from

I have a virtual host set for the domain where I have mentioned below rewrite rules, but they are not working.

RewriteCond %{REMOTE_ADDR}

RewriteCond %{REQUEST_URI} ^/security/assertionconsumerservice$ [NC]

RewriteRule (.*) /content/client1/login [QSA,R,L]

RewriteCond %{REMOTE_ADDR}

RewriteCond %{REQUEST_URI} ^/security/assertionconsumerservice$ [NC]

RewriteRule (.*) /content/client2/login [QSA,R,L]

Could any one please help?

1 Reply


Employee Advisor

Are you sure that the correct virtualhost is used? Have you put the statement "RewriteEngine on" in front of these rules?