homepage Welcome to WebmasterWorld Guest from 50.19.172.0
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
mod rewrite
yurmetal



 
Msg#: 4536444 posted 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

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4536444 posted 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

WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4536444 posted 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved