We need some help with pagerules as we are unable to configure them as per our requirements. We will really appreciate if someone can help us out here…
We have our website which now has Cloudflare and Railgun enabled.
Everything is working perfect just as it should be.
Now we have a folder under our website, lets assume https://www.example.com/dummy/ which has restricted access based on IP authentication, configured in .htaccess of dummy folder. Which means the folder is inaccessible for outside world, except for those IP’s which are allowed using the variable “allow from” in .htaccess
Now when Cloudflare is enabled, we cannot access above folder from our IP which is already alllowed in .htaccess.
We have tried to configure page rules to skip that folder, but no luck. Please find the screen shot of those rules:
Thank you for such a lighting fast reply… I am unsure what you mean here…
Could you please explain?
When Cloudflare is disabled, if we access that folder from our authenticated IP (in .htaccess), we can access it fine. For rest of the world, the folder would give forbidden access denied error.
However with Cloudflare enabled, even we get the same forbidden access denied error.
With Cloudflare everything is typically (unless the records are ) tunnelled through their servers, which means all requests arrive at your server with Cloudflare IP addresses. Cloudflare provides the original IP address in an HTTP header, however you need to rewrite the value of the connecting IP address (on the IP level) to that header in the server. With Apache you’d be using mod_remoteip for that.
Thank you. You have been very helpful. I enabled mod_remoteip on server. However, I am struggling to add rewrite rules to rewrite the value of connecting IP to that as seen in header of server.
Tried googling, but cannot find much related information. Could you please kindly guide me with these rules. Any thread / url’s for reference purpose will do.