Forum Moderators: phranque
RewriteEngine on
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ [mysite.com...] [R,L]
I have no problem making a folder secure:
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^testform.htm$ [mysite.com...] [R,L]
It actually works, but in Firefox, the url turns red for the secure folder/page and says information is only partially encrypted. So it works, but something isn't registering with Firefox. IE6 and IE7 don't seem to say anything and it's ok. Any help out there?
Basically I'm trying to make only certain folders secure and when they're done with the secure pages, and they click somewhere else on the site, it should turn back to non-secure.
Your HTTP and HTTPS redirects need to be fully "mirror-imaged" functionally. For example, in your mysite.com/.htaccess file:
RewriteEngine on
#
# Switch to HTTPS if /test2/test1/test/ directory resources requested using HTTP
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^test2/test1/test/(.*)$ https://www.mysite.com/test2/test1/test/$1 [R=301,L]
#
# Switch back to HTTP if HTTPS request for anything except /test2/test1/test/ subdirectory resources
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI} !^/test2/test1/test/
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
[edited by: jdMorgan at 5:24 pm (utc) on Dec. 20, 2006]
The rest of the page is basically a template that the whole site is designed from. So I guess what you're saying is that the template is being served from unsecured directories (images, css) and causing the conflict. Is that correct?
If there a way around it that you know of?
If the browser throws a mixed-content warning, that means a potentially serious problem for both users and for you.
Jim