Apache: Redirect IP's other than X to [URL]

/ Published in: Apache
Save to your folder(s)

ready for .htaccess, creates 302 temp redirect

Copy this code and paste it in your HTML
  1. Options +FollowSymlinks
  2. RewriteEngine on
  3. RewriteCond %{REMOTE_HOST} !^123\.45\.67\.89
  4. RewriteRule \.html$ /alternate_page.html [R=302,L]

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.