Hi all,

A Newbie here…

I’m trying to redirect users who go to http://webPage.example.com to https://webPage.example.com

The site https://webPage.example.com is working fine, I just can’t get the redirect to work. Here’s what I’ve tried.

To find the VirtualHost listing for https://webPage.example.com I ran this:

apachectl -S | grep -i ‘webPage.example.com

With this result: *:443 webPage.example.com (/etc/httpd/conf.d/ssl.conf:56)

So, I added this code to the end of the ssl.conf file:

<VirtualHost *:80>
ServerName webPage.example.com
Redirect “/” " https://webPage.example.com " ;

This did not work. My guess, the ssl.conf is not the correct .conf file to add the code. How do I find the correct VirtualHost listing. Or, what did I miss?

Thanks, for any help…

4 Spice ups

You can achieve this with a htaccess directive. Depending on your specific requirements have a look here:

Thank you Jayya,

I have 16 .htaccess files on this system. How do I know which one to edit?