password protect a directory or admin folder to your ip only via .htaccess

Started on the old forum in September 2012 · view the original in the archive · old links redirect here

2 replies · 471 views · started 14 years ago · 1 min read

2 participants
hi_jakkk Developer · 52 posts #1

1.Go to admin folder create 2 files .htacces and .htpasswd

2.open .htacces

put these code in it

#remeber /home/admin is path complete path to admin folder AuthUserFile /home/admin/.htpasswd AuthName EnterPassword AuthType Basic <Limit GET POST> require valid-user </Limit>

#123.456.678.467 => your ip order deny,allow deny from all allow from 123.456.678.467

3.open .htpasswd

#enter your username:passwd #you can add many user hi_jakkk:666666

i just found it somewhere and it works...and shared for future or someone who need it..

ozziemale31 Lead · 861 posts #2

re

hi_jakkk wrote: 1.Go to admin folder create 2 files .htacces and .htpasswd

2.open .htacces

put these code in it

#remeber /home/admin is path complete path to admin folder AuthUserFile /home/admin/.htpasswd AuthName EnterPassword AuthType Basic <Limit GET POST> require valid-user </Limit>

#123.456.678.467 => your ip order deny,allow deny from all allow from 123.456.678.467

3.open .htpasswd

#enter your username:passwd #you can add many user hi_jakkk:666666

i just found it somewhere and it works...and shared for future or someone who need it..

or u can goto cpanel and password protect directory that way

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close