Skip to content

Cookie settings

Choose which kinds of cookies you allow. You can change your choice at any time via Cookie settings at the bottom of every page. Privacy statement

Necessary

Always on

Needed to log in, keep your cart and remember your choices. These are always on.

Which cookies?
  • weboke_sessie, weboke_klant, weboke_remember: your session and staying logged in
  • weboke_basket: your cart
  • wkBtwIncl: showing prices with or without VAT
  • wok_cookies: your cookie choice, 12 months

Measures which ad leads to a visit or order, so we do not pay for ads that do nothing.

Which cookies?
  • Google Ads via Google Tag Manager (_gcl_au, _gcl_aw), up to 90 days
  • OpenAI Ads, ads in ChatGPT
  • wok_aff: which partner referred you to us (affiliate programme), 60 days

4.6

How can I block an IP address?

You may want to block certain IP addresses so that they cannot access your website. You can do this quite easily with a PHP script or with a .htaccess file (Linux only). We also give an ASP example. Of course these are small, simple scripts; you can also find more advanced scripts online, free or paid. Just search for php/htaccess/asp (one of the three) and ip block script.

PHP EXAMPLE

In this PHP example you send the visitor to a non-existent page. You could also send them to another site such as Google, but that of course depends on your goal.

<?php

$deny = array("111.111.111", "222.222.222", "333.333.333");

if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) {

header("HTTP/1.0 404 Not Found"); // or send them to Google, for example: header("location: http://www.google.com/");

exit();

} ?>

.HTACCESS EXAMPLE

You can also block IP addresses in a .htaccess file (place it in the public_html directory, Linux hosting only):

<Limit GET>

order allow,deny

allow from all

deny from 123.456.789.0

deny from 123.4.5.

</Limit>

ASP EXAMPLE

An ASP (Windows hosting) example (remember to create the no_access.asp page, and put for example the text of a 404 page in it):

<%

Dim sBlockedIPsBlockedIP = Request.ServerVariables("REMOTE_ADDR")

'check if the IP is the one that is blocked

If sBlockedIP = "32.454.42.12" Then

'if IP address is banned then redirect to no_access.asp

Response.Redirect "no_access.asp"

End If

%>

Was this article helpful?

← Back to General hosting

One moment…

Set up your domains

For each domain, arrange the nameservers, the link to your hosting and who becomes the owner.

Loading your domains…