Re: https redirect without refresh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux