how to restrict directory access using htaccess and allow only my ip

Restrict directory access using htaccess and allow only my ip

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} /your directory name
RewriteCond %{REMOTE_ADDR} !=111.111.111.111
RewriteRule ^.*$ /maintenance.php [R=302,L]
Advertisements