Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

redirctiong apache to apache-ssl

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
edd
Posts: 1
Joined: 2005-10-04 09:34

redirctiong apache to apache-ssl

#1 Post by edd »

Hello.
I am using debian 3.1 sarge and i have apache and apache-ssl packages installed.

I want users to use ssl connection only. I can remove apache and leave only apache-ssl but I am sure that users will forget to type https in front of the server address.

The following php code in the /var/www/index.php is not working:

<?php
header("Location: https://server_adr/anotherdir/start.php"); /* Redirect browser to the secure server */
/* Make sure that code below does not get executed when we redirect. */
exit;
?>

Any ideas?

User avatar
startx
Posts: 172
Joined: 2004-09-16 12:14
Location: london

#2 Post by startx »

hm, for me that works fine.

however, you can use the simple way by

Code: Select all

<?php
echo "<META HTTP-EQUIV=Refresh CONTENT='10; URL=https://server_adr/anotherdir/start.php'>"
?>
you might use an alias in your httpd.conf like

Code: Select all

Alias /var/www https://yoursslserver.name/whatever/
as well.

check redirect options for htaccess files as well or use Rewrite Rules.
best is to check the apache manual pages for that.
debian squeeze for everyday life, many other versions for the rest

Post Reply