Forums
This topic is locked
htaccess problem
Posted 03 May 2011 15:38:37
1
has voted
03 May 2011 15:38:37 reinhardt ellis posted:
I have a page that uses a IFRAME from google maps...I use .htacces to make all my pages https
And now I get security messages all the time... in IE because it does not like this....
Is there anyway to to exclude say map.php so that is can use http??? and not have to go
this is my original
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
and this is what i have done but it doesnt seem to be working... forciing the map link to http and not https!???!?!
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RedirectPermanent https://www.mozzi.co.za/maps/map.php http://www.mozzi.co.za/maps/map.php
Replies
Replied 03 May 2011 17:05:50
03 May 2011 17:05:50 Patrick Woldberg replied:
just add an extra condition
RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} !^/maps/map\.php$ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Replied 04 May 2011 11:17:42
04 May 2011 11:17:42 reinhardt ellis replied:
thank you .,. but it does not seem to be working
Replied 05 May 2011 15:42:09
05 May 2011 15:42:09 daniel james replied:
It is not good way.
Replied 05 May 2011 18:20:11
05 May 2011 18:20:11 reinhardt ellis replied:
do you have an answer for me then Daniel... please
Replied 05 May 2011 18:27:06
05 May 2011 18:27:06 reinhardt ellis replied:
# Redirect everything non-HTTPS to HTTPS, unless its an include file, belongs to a different subdomain, or is the google-map page RewriteCond %{SERVER_PORT} ^80$ RewriteCond %{HTTP_HOST} !=test.mozz.co.za RewriteCond %{HTTP_HOST} !=oldsite.mozzi.co.za RewriteCond %{REQUEST_URI} !(.*css) RewriteCond %{REQUEST_URI} !(.*js) RewriteCond %{REQUEST_URI} !(.*gif) RewriteCond %{REQUEST_URI} !(.*png) RewriteCond %{REQUEST_URI} !(.*jpg) RewriteCond %{REQUEST_URI} !(maps/documents) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] #If HTTPS, redirect Google Map page to non-HTTPS RewriteCond %{SERVER_PORT} ^443$ RewriteCond %{REQUEST_URI} (maps/documents) RewriteRule ^(.*)$ http://%{SERVER_NAME}/$1 [R=301,L]
Replied 11 Jul 2011 01:25:14
11 Jul 2011 01:25:14 Sara Jane replied:
Reinhardt, did you get this issue resolved? I may have a solution but am digging around right now to see if it is the correct information as I dont want to send you on a wild goose chase.