Redirect IP Address Using htaccess

Step #3

Look the person up in the whois database. This will give you a lot of valuable information about the person.

Step #4

After you are sure about the ip address find your .htacces file in your root folder. You can access it via a ftp program like filezilla. You may have to go into your cpanel and set up a ftp log in if you don’t have one. You can contact your hosting provider and they will walk you through the process. I will have a tutorial on this very soon. Now find your .htaccess file and download it to your computer.

Only cool people share!

edirect IP Address Using htaccess filezilla Redirect IP Address Using htaccess filezilla2

Step #5

Now double-click and edit the .htaccess file by entering this code. you can use notepad or download notpad++ here.

[php]
# permanently redirect specific IP request for entire site
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST} 22\.22\.22\.239
RewriteRule \.php$ http://www.destinationwebsite.com/ [R=301,L]
[/php]

Or if you want to redirect a whole range of ip address use this code.

[php]
# permanently redirect ranged IP request for single page
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} 22\.22\.22
RewriteCond %{REQUEST_URI} page-with-form-on.php$
RewriteRule .* http://www.destinationwebsite.com/ [R=301,L]
[/php]

Redirect IP Address Using htaccess was last modified: May 11th, 2015 by Maximus Mccullough
redirects htacess

Pages:Previous 1 2 3 Next

2 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.