#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Red face Mod_rewrite ip restrinctions


    Hello guys!
    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/folder1/page1
    ...domain/folder1/page2
    ...domain/folder2/page1

    etc...

    There is a very large number of URLís and only specific IP Addresses (several) need to have access to them.

    ...domain/folder1/page3
    ...domain/folder2/page2
    Ö
    ...domain/foldername_X/sectionname_Y

    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!
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1100
    Welcome to DevShed.

    Please show/explain how mod_rewrite is being used in relation to the URLs you want to protect. How is /folder1/page1, /folder1/page2, folder2/page1, and so on being rewritten?
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.

IMN logo majestic logo threadwatch logo seochat tools logo