httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nizar KHEIR <>
Subject [users@httpd] https redirect without refresh
Date Mon, 19 Nov 2007 17:17:02 GMT
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]
  Alias /squirrelmail /var/www/squirrelmail
  <Directory /var/www/squirrelmail>
  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;

 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
View raw message