I am using .htaccess file to redirect all web traffic in a folder to ssl, because the directory prompts users for a login. When a user logs in they are redirected from https://subdir.mailmarkup.org/ to https://subdir.mailmarkup.org/~homedir/subdir.

I want users to be redirected from http to https, and this is occuring successfully, however, I do not want users redirected from the first path mentioned above to the second. How do I prevent this?

Here is the .htaccess file:

AuthUserFile /highlevel_path/.htpasswd
AuthName "Portfolio Login"
AuthType Basic
require valid-user
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq "subdir.mailmarkup.org"
ErrorDocument 403 https://subdir.mailmarkup.org
ErrorDocument 401 /401.php
link|improve this question
It would be helpful if you would post the content of the .htaccess file (with domain names, path names etc anonymised if you wish) to give people a better idea of what's going on. – meulop May 4 '10 at 19:12
This .htaccess file obviously doesn't contain any directive causing a redirect. Either it's configured in another part of your Apache httpd configuration or there's a script which performs the redirect. – joschi May 5 '10 at 7:43
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown