httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McGlothlin <micha...@swplumb.com>
Subject Re: [users@httpd] https redirect without refresh
Date Mon, 19 Nov 2007 17:21:00 GMT
Redirect 301 / https://myserver.com/ is usually easier than mod_rewrite?
> Hello every body,
> i have a question about redirecting the apache server from http to 
> https dynamically. In fact, i proceed with the modification of the 
> apache2.conf file, and i force reload the server each time i want to 
> redirect from http to https or vice versa (sure after 
> commenting/decommenting lines in apache2.conf). I have my apache 
> server configured with php module. And i am using my server as a 
> webmail server by adding squirrelmail.
> Once i am connected through squirrelmail, and i want to switch from 
> http to https or vice versa, the switching doesn't take place until i 
> refresh the page, however, as long as i am navigating through the same 
> "squirrelmail.php" dynamic page, my server always runs with http. So 
> is their a way to redirect from http to https (or vice versa) without 
> having each time to ask users to refresh their pages ??? 
>  
> my apache2.conf holds the lines below:
>  
> <VirtualHost *:80>
> <IfModule mod_rewrite.c>
> RewriteEngine on
> RewriteCond %{HTTPS} !^on $ [NC]
> RewriteRule .https://%{HTTP_HOST}%{REQUEST_URI} [L]
> </IfModule>
> Alias /squirrelmail /var/www/squirrelmail
> <Directory /var/www/squirrelmail>
>   ....
> </Directory>
>  
> To redirect to https, i comment the code between the IfModule brackets.
> the 443 virtual host is unchanged (for an http -> https redirection), 
> and i have no problem when using https or http alone (without 
> redirection), that's mean that i have no errors of configuration at 
> this level.
>  
> Hint: i have no problem with the redirection itself because when i 
> refresh the page, the redirection takes place, but what i need is a 
> redirection when clicking on anything in the dynamic page, not 
> necessarly refreshing the page, because as you know, anytime we click 
> on a link within the dynamic php page,  new request is generated to 
> the server, so theoretically, it must lead to a redirection, so why 
> this redirection does not take place only if i refresh the page ????
>  
> thanks for your help;
> nizar
>
> ------------------------------------------------------------------------
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails 
> <http://www.trueswitch.com/yahoo-fr/> vers Yahoo! Mail 


-- 
Michael McGlothlin
Southwest Plumbing Supply


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message