Welcome to WebmasterWorld Guest from 18.104.22.168 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Pubcon Website
mod rewrite yurmetal msg:4536446 7:38 am on Jan 16, 2013 (gmt 0) We have a system utilizing Mod_Rewrite in .htaccess to generate SEO Friendly URL’s. My goal is to manage access to these URL’s by source IP address. Unfortunately the website engine does not have the ability to restrict access by IP, so I’m exploring possibilities to do this using Apache’s built in features. Here is an example of the restriction scheme I’m thinking: There is a pre-defined list of URL’s Everyone needs to have access to: [ ...] domain.com [ ...] domain.com [ ...] domain.com There is a very large number of URL’s and only specific IP Addresses (several) need to have access to them. [ ...] domain.com [ ...] domain.com … [ ...] domain.com Access to these URL’s needs to be granted only to IP_Address1, IP_Address2, IP_Address3 and deny access for everyone else. Please advice if such a thing is possible. If yes, then how can this be achieved. Thanks in advice.
g1smd msg:4536455 8:04 am on Jan 16, 2013 (gmt 0)
Please use example.com in this forum to supress the URL auto-linking function. What you want to do is very possible, and can be achieved with a small number of rules, with the code being not that much different to the code which is used to block access from specific IPs.
lucy24 msg:4536502 11:29 am on Jan 16, 2013 (gmt 0)
What happens when the lawful occupant of Permitted IP Address 1 is on a business trip and needs to consult a file in the restricted block? One possible answer is: The nature of the site makes this scenario impossible. But it's better to ask the question beforehand than to think of it only after you've got your perfect code in place. I'm thinking there will have to be a "Satisfy..." in there somewhere.