I'm having some problems with SSL.
In httpd.conf, I have these two directives:
Code:
<Directory "/home/my_site/public_html">
AllowOverride All
RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ http://www.my_site.com/$1 [R,L]
</Directory>
<Directory "/home/my_site/public_html/classes">
AllowOverride All
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} secure
RewriteRule ^(.*)$ https://www.my_site.com/classes/$1 [R,L]
</Directory>
<Directory "/home/my_site/public_html/secure">
AllowOverride All
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} secure
RewriteRule ^(.*)$ https://www.my_site.com/secure/$1 [R,L]
</Directory>
The problem is that in
https://www.my_site.com/secure, I have some paged that include scripts in
/home/my_site/public_html/classes with the path
$_SERVER['DOCUMENT_ROOT']."/classes/access_user/some_script.php" not a URL, so they are not being served up via HTTPS.
Simply changing the include to
"https://my_site.com/classes/access_user/some_script.php"
The problem seems to be the first directive that I'm using to prevent HTTPS access for content that doesn't need it...
What is the solution?