How can I block a Specific IP Address from .htaccess?

Hi, The allow-block command for .htaccess does not work in Cyberpanel. That's why I'm having trouble directing a rope.

What I want to do is exactly this: I just want to redirect visitors from a particular ip to a different domain.

The following code works with redirect, but it applies to everyone. I just want it to work for specific ip addresses. I've tried many ways, but I failed.

RewriteEngine on
RewriteRule (. *) Https:// [R = 301, L]

Thanks in advance for the help.


Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion