Redirect HTTPS page to HTTPS page

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

 



I have created a login page for a network of mine and am needing some Rewrite help. Let me describe what is going on.

When you first connect to the network and visit an HTTP page, my rewrite rules redirect the user to https://dns-name-of-server/index.php. When you first connect to the network and visit an HTTPS page, my rewrite rules redirect the user to the appropriate page, but do not change the URL. Thus, the user receives an SSL certificate error because the name on the certificate does not match the name in the URL.

I have seen other users who have wanted to do this, but I have never found an answer. Does anybody have any ideas as to how to get this to work without the certificate error? Below is the code for my rewrite rules.

RewriteEngine On
RewriteCond %{HTTP_HOST}        !^auth\.server\.com$
RewriteRule (.*) https://auth.server.com/index.php [R=301,L]

I have also tried:

RewriteEngine On
RewriteCond %{SERVER_PORT}      ^443$
RewriteCond %{HTTP_HOST}        !^auth\.server\.com$
RewriteRule (.*) https://auth.server.com/index.php [R=301,L]

--
Nathaniel Hall, GSEC GCFW GCIA GCIH GCFA
Spider Security


---------------------------------------------------------------------
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