MyBB Community Forums

Full Version: .htaccess help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So the previous owner of my forum set the .htaccess to only allow certain IPs to access the admin CP. It was formatted like this:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/errordocs/error404.htm$
RewriteCond %{REMOTE_HOST} !XXXXXXXXX
RewriteRule $ /errordocs/error404.htm [R=302,L]

Xs are where his IP was. I changed it to mine, and now I can access it fine. My question is, how do I make it so my co-admin can access the AdminCP as well?
(2012-08-27, 03:21 PM)AvatarX Wrote: [ -> ]So the previous owner of my forum set the .htaccess to only allow certain IPs to access the admin CP. It was formatted like this:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/errordocs/error404.htm$
RewriteCond %{REMOTE_HOST} !XXXXXXXXX
RewriteRule $ /errordocs/error404.htm [R=302,L]

Xs are where his IP was. I changed it to mine, and now I can access it fine. My question is, how do I make it so my co-admin can access the AdminCP as well?

Try doing this:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/errordocs/error404.htm$
RewriteCond %{REMOTE_HOST} !X
RewriteRule $ /errordocs/error404.htm [R=302,L]
RewriteCond %{REQUEST_URI} !/errordocs/error404.htm$
RewriteCond %{REMOTE_HOST} !Y
RewriteRule $ /errordocs/error404.htm [R=302,L]
Where X is your IP and Y is you co admin's IP

Edit: Sorry this wont work because of the RewriteRule being the same.
I see. So this will not work?
Use

Order Deny,Allow
Deny from All
Allow from [Your IP] [Other IP]
I would suggest using allow and deny if you want multiple IPs.

Order deny,allow
Deny from all
Allow from x.x.x.x
I have one .htaccess file that says Deny all. It's in the uploads folder.

And then it's the other one that has what I mentioned in my initial post. The folder has a lot of random numbers and letters. I think it has been renamed for security purposes from one of the default folders.

Which .htaccess do I edit?
You want to edit the .htaccess in the admin directory (or if the admin directory has been renamed, in that folder).
I will update with how it goes after I make a backup first.
Create a .htaccess file in the admin directory.

Fill it with the following:

Order deny,allow
Deny from all
Allow from [ Your IP ] [ Other IP ]
testerwester, it did not work.

I have this plugin installed, if that is of any importance. http://mods.mybb.com/view/admin-ip-match

AdminIPMatch.php and AdminIPMatch_plugin_admin.lang.php

(2012-08-27, 07:12 PM)NaXuh Wrote: [ -> ]I would suggest using allow and deny if you want multiple IPs.

Order deny,allow
Deny from all
Allow from x.x.x.x

How would I format it for a second IP?
Pages: 1 2