Forum Moderators: phranque

Message Too Old, No Replies

Allow only 1 IP address for file upload and edit

         

jcmiras

2:59 am on Jul 8, 2008 (gmt 0)

10+ Year Member



Hi everyone,

Is there a way to block all ip addresses, except mine, from uploading and editing the files in my server? I just want to try if this can limit the hackers in my site.

Thanks.

g1smd

2:16 pm on Jul 8, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, there is. Test for the remote IP value and fail all other requests.

The code goes in your .htaccess file.

You can either use the deny from syntax or else use a rewriteRule for this.

There are many prior code examples here in the forum.

You might also wish to deny access to your site via proxies.

You could also limit things to one particular type of browser, such as Firefox or Safari.

Check the prior forum examples, and post your best-effort code here.