Protecting admin.php, the /install directory, and test & development installations using .htaccess

Protecting admin.php, the /install directory, and test & development installations using .htaccess

Paul B

XenForo moderator
Staff member
just for all wich don´t know exatctly how to ip-protect:
Code:
<Files admin.php>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ???.???.???.??? # set your ip here
</Files>
 
I have a dynamic IP but it normally varies only slightly. Is there a wildcard char that can be used? Would something like 159.254.???.??? work? I know it is not 100% secure but it should be solid enough for my purposes.
 
Good advice, I've been using htaccess to control my wordpress, vbulletin, and XF access based on IP, works great!
 
Not bad but i recommend using this one! ( works good )
Code:
<Files admin.php>
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^120\.0\.0\.1
RewriteCond %{REMOTE_HOST} !^123\.45\.56\.789
RewriteCond %{REQUEST_URI} !/index\.php$
RewriteRule .* /index.php [R=302,L]
</Files>
that way rather then giving the person and error, it just redirects them back to the home page.... :)

please "Like" if you use! :)
 
In that case speak to your host.

I don't know what services and features are available with godaddy.
 
hey guys, it doesnt work for me, i tried all of them...

Not Found

The requested URL /cpanel was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
 
Hmmm ...
I tried my other godaddy account and it didnt work either.
It looks like cpanel is an OPTION in godaddy.
The shared hosting account doesnt seem to have cpanel, whereas the virtual dedicated account does have cpanel.
Godaddy has their own cpanel ... just log into godaddy.com to access it.
IMO, cpanel is better than what godaddy provides.
 
Top Bottom