grabmail
12-10-2006, 08:15 PM
with htaccess files.
so if someone enter
https://www.domain.com
i want to redirect him to http://www.domain.com
so if someone enter
https://www.domain.com
i want to redirect him to http://www.domain.com
![]() | View Full Version : how to force redirect https to http grabmail 12-10-2006, 08:15 PM with htaccess files. so if someone enter https://www.domain.com i want to redirect him to http://www.domain.com horizon 12-10-2006, 09:11 PM if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { your condition here ... } ;) Iggy 12-10-2006, 09:22 PM Redirect / http://yourdomain.com/ Would probably do it. Iggy chrisranjana 12-11-2006, 11:35 AM At present if they type https://www.domain.com where does it go ? grabmail 12-11-2006, 12:30 PM they go https://www.domain.com (https://www.domain.com/) foobic 12-11-2006, 07:49 PM Are you trying to do this in order to prevent security warnings? If so it won't work - the warnings will be generated when the ssl connection is established, before the redirect can take effect. But if you still want to try, this should do it: RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteCond %{SERVER_PORT} ^443$ RewriteRule (.*) http://www.domain.com/$1 [R=301,L] TheGG 12-13-2006, 02:09 PM You can also try the 302 - permanent redirection. If it is suitable in your case. |