htaccess - incoming IP and URL check

Job ID: 37634619

Budget: $10 – $30 USD

I need someone who can create a htaccess process (or something similar) that first checks an incoming referrers IP address against what we might call the "Blocked IP List". If there is an IP match to this list then the referrer is blocked.

If the IP is found to be OK when compared to the "Blocked IP List", then the incoming URL is then compared to another list that we will call a "Block URLs List". The "Block URLs List" is a pre-determined (we will manually create this list) list of URLs and if there is a match that the referrer is blocked from the site and the incoming IP of this referrer is to be written to the "Blocked IP List" mentioned above.

I'm not sure if the above can be achieved just by using htaccess so any solution you might have would be considered as long as it does the job.

For example if the incoming URL is:

/home1/mysite/public_html/wordpress

and the "Blocked URLs List" contains an entry called:

/home1/mysite/public_html/wordpress

that the process would block the referrer and capture the IP address of the incoming referrer and write this IP to the "Blocked IP List".

So in summary, when a visitor arrives at our site their IP address is first compared to a "Blocked IP List". If there is a match then they are blocked and if they pass then the incoming URL is compared to a "Blocked URLs List". If there is no match then they can visit our site otherwise if there is a URL match their IP address is written to the "Blocked IP List" mentioned above and they are then blocked from our site.

Don't forget to mention the codeword "all good" in your proposal reply so that I know you have read our project details.
Related categories: PHP System Admin Linux Apache MySQL