Link to home
Start Free TrialLog in
Avatar of JoelT
JoelT

asked on

How do I redirect by IP Address using htaccess?

Hi, I am wanting to redirect all users except 3 IP addresses.

All files / onwards should redirect to /standby/upgrading.html

This should affect all users except 3 IP addresses which will need access without being redirected.

Any help with this appreciated.
ASKER CERTIFIED SOLUTION
Avatar of jb1dev
jb1dev

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jb1dev
jb1dev

I redirect to google, you might redirect elsewhere.

Avatar of JoelT

ASKER

Thanks, I worked it out ;)

Just a tip to those redirecting to a local address....  inside the folder you are redirecting to put "RewriteEngine On" in to a htaccess file and nothing else in there, don't include the quotation marks otherwise using the above post sends it in to a loop if redirecting locally.

Regards,

Joel