htaccess question...

M

mentalguy2004

Hi,

How do I use the htaccess file on my server to allow access from just one
(my) IP, but deny access to all others? I can allow everyone EXCEPT me, but
am having trouble doing it the other way. Thanks!
 
E

Els

mentalguy2004 said:
Hi,

How do I use the htaccess file on my server to allow access
from just one (my) IP, but deny access to all others? I can
allow everyone EXCEPT me, but am having trouble doing it
the other way. Thanks!

If you have !^ in the RewriteCond, change it to ^
If you only have ^ there, change it to !^

(If you are using a Rewrite for it that is)

Your question is better posted in alt.apache.configuration.
 
K

Kim André Akerø

mentalguy2004 said:
Hi,

How do I use the htaccess file on my server to allow access from just one
(my) IP, but deny access to all others? I can allow everyone EXCEPT me, but
am having trouble doing it the other way. Thanks!

..htaccess:
---------------------
Order deny,allow
Deny from all
Allow from [your ip]
---------------------

If you want to allow additional IP addresses, just add one line for each IP
address or address range beginning with "Allow from".

http://httpd.apache.org/docs/howto/auth.html#access
http://httpd.apache.org/docs-2.0/mod/mod_access.html
 
L

lostinspace

----- Original Message -----
From: "mentalguy2004" <>
Newsgroups: alt.html
Sent: Tuesday, August 24, 2004 2:22 PM
Subject: htaccess question...

Hi,

How do I use the htaccess file on my server to allow access from just one
(my) IP, but deny access to all others? I can allow everyone EXCEPT me,
but
am having trouble doing it the other way. Thanks!

Please note; these lines are not complete and require other lines.
Order Deny,Allow
Deny from all
Allow from hostname.example.com (or IP
range)http://httpd.apache.org/docs/howto/auth.html#allowdeny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top