0

I have a page that I do not want anyone to see except staff, there is no sensitive data on the page, I just do not want it accessible to everyone.

Is there a way to block access to website.co.uk/page for everyone not on my network?

I can set up password protection but I do not want this.

Thanks

edit

This works on the test site:

RewriteEngine on

    RewriteCond %{REMOTE_ADDR} !^xx\.xx\.xx\.xx$
    RewriteRule ^page/? - [F,NC]

But I have added it to the live site and I cannot access this page as I believe that the website is seeing my CDN IP address and not mine, is there a way around this?

  • 1
    If REMOTE_ADDR is not available or usable you can try HTTP_X_FORWARDED_FOR – Vincent Hornikx Sep 30 '16 at 13:55
  • Mind to add this as an answer @VincentHornikx? – Anna Völkl Feb 4 '17 at 7:46
  • 1
    Done @AnnaVölkl – Vincent Hornikx Feb 8 '17 at 21:33
2

If REMOTE_ADDR is not available or usable you can try HTTP_X_FORWARDED_FOR

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.