Folder Rewrite based upon IP

Fix it!!

Folder Rewrite based upon IP

Postby brill.us » Sun Apr 29, 2007 10:01 am

Hey guys,

Need a tiny bit of help here.

I need to setup a mod_rewrite rule where
everyone trying to access /admin is redirected to:

http://www.domain.com/403.shtml

and my IP 1.1.1.1 is allowed to continue into that folder...

Anyone got any ideas?

Thanks!
brill.us
 
Posts: 16
Joined: Sun Mar 11, 2007 2:57 pm

Postby richardk » Sun Apr 29, 2007 10:41 am

Don't use mod_rewrite.

In a .htaccess file in the /admin directory
Code: Select all
ErrorDocument 403 /403.html

Order Deny,Allow
Deny from all
Allow from 1.1.1.1
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby brill.us » Sun Apr 29, 2007 11:01 am

Thanks man!
brill.us
 
Posts: 16
Joined: Sun Mar 11, 2007 2:57 pm


Return to Security with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 6 guests

cron