Forum Moderators: phranque
I'd like to only allow my ip address and deny all other addresses from viewing the whole website while i make sure its ok.
also i would like to forward all other ip addresses (except for mine) to an external url.
so far i have the allow/deny permissions
Order Deny,Allow
Allow from 1.2.3.4
Deny from all
all i need now is to forward everyone else, to somewhere else
any help would be greatly appreciated :)
If instead you want to redirect all other clients, then use mod_rewrite:
Options +FollowSymLinks
RewriteEngine on
#
# Redirect all except developer IP address to alternate domain
RewriteCond %{REMOTE_ADDR} !^1.2\.3\.4$
RewriteRule .* http://www.google.com/ [R=302,L]
Jim
Options +FollowSymLinks
RewriteEngine on
#
# Redirect all except developer IP address to alternate domain
RewriteCond %{REMOTE_ADDR}!^1.2\.3\.4$ #home
RewriteCond %{REMOTE_ADDR}!^5.6\.7\.8$ #work
RewriteRule .* [google.com...] [R=302,L]
is the above possible?
Options +FollowSymLinks
RewriteEngine on
#
# Redirect all except developer IP addresses to alternate domain
# home IP address
RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4$
# work IP address
RewriteCond %{REMOTE_ADDR} !^5\.6\.7\.8$
RewriteRule .* http://www.google.com/ [R=302,L]
Jim