Roundcube Community Forum

 

Restrict /webmail/ in htaccess?

Started by scottl31, October 22, 2015, 06:05:26 PM

Previous topic - Next topic

scottl31

I have googled a lot for this, so I just need to ask.

I want to restrict a particular IP or range from accessing our mydomain.com/webmail/

I know how to do this for a site or directory, but since there is no /webmail/ directory I can't figure it out.

If I put a deny from all Like:

Order Deny,Allow
Deny from xxx.xxx.xxx.xxx

Then the top level of the site is blocked, but mydomain.com/webmail/ is still accessible.

Anybody know how to block this?

Thanks!

JohnDoh

You could put the restrictions in the .htaccess file in the root of what ever folder /webmail/ points to. I guess that is an alias. and there should already be a .htaccess file there any way because roundcube ships with one in that location.

or you can set it in the apache config have a look here https://httpd.apache.org/docs/2.2/mod/mod_alias.html something like this:

Alias /image /ftp/pub/image
<Directory /ftp/pub/image>
Order allow,deny
Allow from all
</Directory>
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...