HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   HTTPS site points to same directory as HTTP? (http://www.howtoforge.com/forums/showthread.php?t=11703)

lewis_saint 27th March 2007 22:40

HTTPS site points to same directory as HTTP?
 
If I enable SSL on mydomain.com, how come the virtual hosts for http://mydomain.com and https://mydomain.com point to the same place?
How should I set it up so that users are prevented from accessing the 'secure content' insecurely?

Regards,

Lewis

till 28th March 2007 08:13

http and https sites point always to the same place.

Quote:

How should I set it up so that users are prevented from accessing the 'secure content' insecurely?
You may use e.g. a apache rewrite rule for this.

lewis_saint 30th March 2007 14:32

I have tried looking through the apache documentation. Could you give me an example?

Would I just have:
Redirect / https://mydomain.com/
but then, if I went to https://mydomain.com/folder1/ I would be redirected to https://mydomain.com/

Regards,

Lewis

till 31st March 2007 13:24

Something like this should work:

RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule (.*) https://mydomain.com/ [R]


All times are GMT +2. The time now is 11:41.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.