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
BedrockMission!

Learn More

View all

Sign in to view all badges

Dispatcher rewrite rule based on the source IP/Domain

Avatar

Avatar
Validate 1
Level 1
preetivardhanb9
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
preetivardhanb9
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
preetivardhanb9
Level 1

19-06-2019

Hi,

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 1.1.1.1 and 2.2.2.2) Dispatcher should render page1 if the request is from abc.com and page2 if the request is from xyz.com.

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

RewriteCond %{REMOTE_ADDR} 1.1.1.1

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

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

RewriteCond %{REMOTE_ADDR} 2.2.2.2

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

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

Could any one please help?

Replies

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,086 likes

Total Posts

3,121 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,086 likes

Total Posts

3,121 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

19-06-2019

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