logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: conditional redirect?
Author
Danll



Joined: 02 Aug 2013
Posts: 49
Location: USA, Houston

PostPosted: Tue 25 Oct '16 23:41    Post subject: conditional redirect? Reply with quote

I have a redirect set up, based on {HTTP_REFERRER}, but I want to allow one particular IP, coming from that REFERRER to NOT be redirected. How do I do this?

I assume I need an [AND] and some kind of negation, but I don't know how to do that.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 12 Nov '16 22:29    Post subject: Reply with quote

I think this might work

<LocationMatch ^/test.php>
<If "%{HTTP_REFERRER} =~ /somewhat/">
Require ip 192.168.178.100
</If>
</LocationMatch>
Back to top


Reply to topic   Topic: conditional redirect? View previous topic :: View next topic
Post new topic   Forum Index -> Apache