GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Apache2 Redirect question
Operating System - HP-UX
1847474
Members
2986
Online
110265
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2003 09:11 AM
05-23-2003 09:11 AM
Apache2 Redirect question
I set up a web site using Apache2, listening on port 80 and port 443, same IP address, with SSL enabled by means of a secure server certificate for the port 443 virtual host. I would like users to be able to initially access the web site via port 80 (i.e., not have to use "https" instead of the default "http") -
BUT after this initial connection I would like the entire remainder of the client browser - web server session to be conducted via port 443 and "https", preferably without the unsecure (port 80) web site having to be involved at all, and without any actions needed on the part of the user. So if the client initially connects to "http://test.mywebsite.com" I want to force the client's browser to reconnect to "https://test.mywebsite.com" and conduct all further business there.
BUT after this initial connection I would like the entire remainder of the client browser - web server session to be conducted via port 443 and "https", preferably without the unsecure (port 80) web site having to be involved at all, and without any actions needed on the part of the user. So if the client initially connects to "http://test.mywebsite.com" I want to force the client's browser to reconnect to "https://test.mywebsite.com" and conduct all further business there.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2003 10:40 AM
05-23-2003 10:40 AM
Re: Apache2 Redirect question
hello:
*****************************
see you: http://httpd.apache.org/docs/mod/mod_alias.html
*****************************
Other
Using mod_rewrite to re-direct http requests to https
Compile apache with the rewrite module as described above.
Add the following to the httpd.conf:
UseCanonicalName Off
#############################
# Mod rewrite stuff
#############################
# rewrite environment
RewriteEngine on
RewriteLog /www/var/log/https_rewrite_log
RewriteLogLevel 1
# redirect http to https
# If you don't try to access https, then redirect to https
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
If you add any virtual hosts, you also need to add:
RewriteEngine on
RewriteOptions inherit
to each VirtualHost entry.
for more help:
http://www.kordy.dircon.co.uk/misc/mod_ssl.html
other option is using .htacces
*****************************
see you: http://httpd.apache.org/docs/mod/mod_alias.html
*****************************
Other
Using mod_rewrite to re-direct http requests to https
Compile apache with the rewrite module as described above.
Add the following to the httpd.conf:
UseCanonicalName Off
#############################
# Mod rewrite stuff
#############################
# rewrite environment
RewriteEngine on
RewriteLog /www/var/log/https_rewrite_log
RewriteLogLevel 1
# redirect http to https
# If you don't try to access https, then redirect to https
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
If you add any virtual hosts, you also need to add:
RewriteEngine on
RewriteOptions inherit
to each VirtualHost entry.
for more help:
http://www.kordy.dircon.co.uk/misc/mod_ssl.html
other option is using .htacces
legionx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2003 10:44 AM
05-23-2003 10:44 AM
Re: Apache2 Redirect question
There are two ways to do this.
1) In your apache config file for the port 80 vhost
Redirect / https://test.mywebsite.com
2) In your index.html file for the port 80 vhost
<meta http-equiv="refresh" content="0; URL=https://test.mywebsite.com" />
HTH.
1) In your apache config file for the port 80 vhost
Redirect / https://test.mywebsite.com
2) In your index.html file for the port 80 vhost
<meta http-equiv="refresh" content="0; URL=https://test.mywebsite.com" />
HTH.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP