473,378 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

VirtualHost Redirect to HTTPS, SSLRequireSSL? ModRewrite?

dlite922
1,584 Expert 1GB
I need help with redirecting virtualhosts to use HTTPS (SSL) when they type in HTTP

Must work in IE.

Right now there is two virtual host blocks for every subdomain.

I want to combine the virtual hosts so that I don't have one for port 80 (which basically gives you a page that says type https, UGH! ugly!), and one for port 443

Current Config:
Expand|Select|Wrap|Line Numbers
  1. <VirtualHost x.x.x.x:80>
  2.     ServerName sub1.example.com
  3.     DocumentRoot...
  4.     DirectoryIndex...
  5. </VirtualHost> 
  6.  
  7. <VirtualHost x.x.x.x:443>
  8.     ServerName sub1.example.com
  9.     SSL Engine on
  10.     SSLCertificateFile ...
  11.     SSLCertificateKeyFile...
  12.     SSLCertificateChainFile...
  13.     DocumentRoot...
  14.     DirectoryIndex...
  15. </VirtualHost> 
  16.  
  17.  
  18.  
  19.  
  20.  
How can I combine those to that if someone types in HTTP it redirects to HTTPS.

(I know its ModRewrite but I don't know how, GoogleSearch examples were confusing. )

SSLRequireSSL gives you an access denied page if not SSL?

thanks in advance,



Dan
Jul 3 '08 #1
0 4619

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Bob Hansen | last post by:
I am using the following code in my default.asp page to redirect the page from HTTP to HTTPS <% if Request.ServerVariables("HTTPS") = "off" Then Response.Redirect("https://" &...
2
by: Robert Gordon | last post by:
I now realize I probably should have tried posting this on the IIS board first.. I am running OWA 2003 Server as Front End server to my Exchange 2000 native domain. The FE server is secured by...
3
by: Pooja Renukdas | last post by:
Hello, I have this web site where only two pages have to be secure pages and I need to call them using https, but since I have my development server and my production web server, I dont want to...
2
by: Sergej Prokoviev | last post by:
We are running our site at www.waynesavings.com on secure hosting (Server 2003, IIS). We are using a custom 403.4 error page (called 403_4.asp, located under root) to redirect all users to https if...
1
by: mark Bannister | last post by:
Newbie here. Site is on shared server Apache, PHP 4.x I am using modrewrite currently for some other things but I was wondering about includes in php files. They don't seem to pass through...
7
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am trying to set this up using asp code and IIS configuration. But it seems not working. Here it is the way I am doing. In IIS I set up a virtual directory with secure communication, I...
8
by: howa | last post by:
a page currently in HTTPS, I force the client to redirect to another page using HTTP under the same domain (e.g. abc.com), i.e. header("Location: http://www.abc.com/index.php"); IE...
1
helimeef
by: helimeef | last post by:
Hey all, I'm having trouble setting up VirtualHosts on an Apache server running on Mac OS X 10.5 Leopard. I followed this tutorial, and everything is working (except VirtualHost of course). Okay, so...
0
by: Raven | last post by:
Hi, I have a problem with a server side redirect from a secure page to a non-secure page (same domain name, same folder) I have added some test code that can display the target URL and that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.