0

Please help me with the htaccess. I tried to create a rule whereby a user visiting a particular web page is automatically redirected to another page on the site, but if I visit it page, this rule does not work for me (for a specific IP address).

LiteSpeed ​​installed on the server, and I think fits the rule for Apache (correct if I'm wrong, I just do not understand the server software).

Sorry for bad english.

user1103744
  • 2,451
  • 4
  • 20
  • 20

1 Answers1

1

This is a 302-Moved Temporarily redirection.

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST} !^xxx\.xxx\.xxx\.xxx
RewriteRule \.html$ /anotherPage.html [R=302,L]

where xxx.xxx.xxx.xxx is your ip and anotherPage.html is the redirection page.

Pier-Alexandre Bouchard
  • 5,135
  • 5
  • 37
  • 72