Alloy editor and htaccess file

HI, I wonder if it is possible to restrict access to the Alloy editor’s directory to a single IP address with a htaccess file without compromising the proper functioning of the editor?
Is anyone already using this option? Thanks in advance for your answers.

Hi @Bruno Yes it works perfectly. Thank you very much for helping myself :rofl: :+1:

1 Like

Glad you got it sorted.

Please share how you solved the problem, so that people can find the solution when they search the forum in the future!

@jacksona Hi, As no one had responded to my first email, I just added a .htaccess file to the Alloy editor’s directory to test (traditionnal way). It works well.
Here is an example of a .htaccess old fashion (Apache 2.2):
RewriteEngine on
Order Deny,Allow
Deny from all
Allow from 123.123.123.123 # put your IP

Here is an exemple new style :joy: (Apache 2.4)
Require all denied
Require ip 123.123.123.123 #Put your IP

I chose the old way because I’m not sure of the Apache server version used by my web provider.
Attention must also be paid to the default blocks configured on the server by the host. It may be necessary to add the lines allowing the server to access the directory like that for old fashion (Apache 2.2):

Allow from 127.0.0.1 # allow localhost
Allow from ::1 # for IPv6 localhost address

Or like that for new style (Apache 2.4):
Require ip 127.0.0.1
Require ip ::1 # ipv6 localhost address

Obviously, you must have a dedicated ip address. I use my VPN’s one, it is also possible to use rebouncing but that’s another story.

Be very careful with the address restriction because it will no longer be possible to access the protected directory from another IP address. You will then have to access the .htaccess to modify it. It’s grandpa’s advice but it’s because he’s been through it too often. :sob:

Here I hope it will help secure access to his blog. A final note: you can also only allow access to certain domains, for example truc.com or www.bidule.net.

3 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.