• Resolved qwe7410

    (@qwe7410)


    I don’t want the user to know he has been blacklisted and forbidden.

    How can I make it look like a webpage not found or 404

    • This topic was modified 2 years, 11 months ago by qwe7410.
Viewing 1 replies (of 1 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Add this to the beginning of your .htaccess:

    RewriteEngine on
    RewriteCond %{REMOTE_ADDR} #####
    RewriteCond %{REQUEST_URI} !=/home.php
    RewriteRule .* /home.php [L]
    Change /home.php to the page you wish locked users to be redirected to
    Change ##### to a regex pattern to match your IP ranges.

    Generate a regex pattern with an IP range here: https://d-fault.nl/CIDRtoRegEx

    1. For example, the IP range could be 1.1.1.1/24
    2. Converted, it looks like ^(1\.1\.1\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$
    3. Then the rule would be RewriteCond %{REMOTE_ADDR} ^(1\.1\.1\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$

    When users visit the site and their IP is within that range, they will be automatically redirected to /home.php, and if they try to navigate to a different page, they will be sent back to the home page.

Viewing 1 replies (of 1 total)
  • The topic ‘Amend page : Forbidden You don’t have permission to access this resource’ is closed to new replies.