You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "John W. Sopko Jr." <so...@cs.unc.edu> on 2002/02/04 20:09:13 UTC

http to https redirect when .htaccess encountered

I am having a difficult time solving the following: I want our
apache non-secure http:// server to redirect to the secure
https:// server whenever the non-secure server encounters a
.htaccess file in any directory? I do not want to redirect entire
directories or the server itself, only those that contain a
.htaccess file.

The standard apache Redirect or RedirectMatch cannot do this
because the .htaccess file is not typically specified by the
user. You run into a looping problem if you specify a redirect
in the .htaccess file itself.

I was hoping there is some switch at the server level to do this.
I of course searched all the docs and mailing archives for
a solution first.

Any solutions would be appreciated. Thanks.


-- 
John W. Sopko Jr.               University of North Carolina
email: sopko@cs.unc.edu         Computer Science Dept., CB 3175
Phone: 919-962-1844             Sitterson Hall; Room 135
Fax:   919-962-1799             Chapel Hill, NC 27599-3175

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org