MyBB Community Forums

Full Version: .htaccess
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have my admin folder .hta formatted like this:

Order deny,allow
Deny from all
Allow from My-IP
Allow from Co-Admin IP

After we migrated hosts, it seems that my co-admin can't access the AdminCP. He gets a 403 error.

We didn't change anything. Why is this happening?
Did he checked his ip? Maybe he restarted router and now he have new IP. Try deleting .hta and make new one.
Alright. I just activated Cloudflare also. Could that have anything to do with it?
(Updated with correct fix)

CloudFlare uses a custom environment variable to show the user's real IP.

Try this code instead. I use a similar system on my network.

SetEnvIf CF-Connecting-IP "127.0.0.1" AllowIP
SetEnvIf CF-Connecting-IP "127.0.0.2" AllowIP
order deny,allow
deny from all
allow from env=AllowIP

Make sure you also make the following change:

Admin CP > Configuration > Server and Optimization Options > Scrutinize User's IP address? > Yes
Where the "127.0.0.1" and "127.0.0.2" is, I replace with my IP and my co-admin's IP. Correct?
(2012-09-02, 11:31 PM)Nathan Malcolm Wrote: [ -> ]CloudFlare uses a custom environment variable to show the user's real IP.

Try this code instead. I use a similar system on my network.

SetEnvIf CF_Connecting_IP "127.0.0.1" AllowIP
SetEnvIf CF_Connecting_IP "127.0.0.2" AllowIP
order deny,allow
deny from all
allow from env=AllowIP

Make sure you also make the following change:

Admin CP > Configuration > Server and Optimization Options > Scrutinize User's IP address? > Yes

I'm using this:

SetEnvIf CF_Connecting_IP "myipaddress" AllowIP
order deny,allow
deny from all
allow from env=AllowIP

Doesn't work though. I've placed it in .htaccess in /admin and Scrutinize User's IP address is set to yes. I'm using CloudFlare.

I just get 403 Forbidden on the admin panel.

Any idea why?
Try CF-Connecting-IP instead.
(2012-09-15, 02:12 PM)Nathan Malcolm Wrote: [ -> ]Try CF-Connecting-IP instead.

That's done the trick. Cheers.