htaccess: How to hide a webmail client behind wordpress?

Here’s the setup:

A webmail client is accessible through two URLs:

  • www.server.com/webmail

    (The directory in which it is installed.)

  • www.server.com/wp-admin/admin.php?page=webmail-plugin

    (A wordpress plugin that displays the webmail client in an iframe inside wordpress admin.)

Now, if a user tries to access the webmail client through www.server.com/webmail it should be redirected to www.server.com/wp-admin/admin.php?page=webmail-plugin (which forces the user to log in first). However, the wordpress plugin must still be able to access www.server.com/webmail to be able to display the webmail client inside the iframe.

Can this be configured through .htaccess? If so, how?

A little background information:
I’d like to do this for security reasons: WordPress is secured by various means, but the webmail client only supports basic authentication and the easiest way to prevent any issues with the webmail client is to hide it behind wordpress. If this can’t be done through htaccess, what other options would you suggest?

Your advise is highly appreciated. Thank you!

Read more here: htaccess: How to hide a webmail client behind wordpress?

Leave a Reply

Your email address will not be published. Required fields are marked *