HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Auto forward https:// requests to http:// site (SSL to non SSL) (http://www.howtoforge.com/forums/showthread.php?t=56519)

n0fx 13th March 2012 00:50

Auto forward https:// requests to http:// site (SSL to non SSL)
 
I have ISPconfig 2 setup but no SSL on my site and no certificate installed on my server. There is only one site on the server but I need to forward all HTTPS requests to the HTTP site.

I read another thread on using mod_rewrite to do it but I was wondering how to do I use mod_rewrite to do it? Do I need to modify the .htaccess file in the root to do this?

Thanks!

till 13th March 2012 10:14

Please see ISPConfig FAQ:

http://www.faqforge.com/linux/contro...che-webserver/

n0fx 13th March 2012 18:02

Quote:

Originally Posted by till (Post 275376)

That's for http -> https. I'm trying to do https -> http. For the webserver that I setup, the users want the site forwarded from https requests to the regular http site. SSL hasn't been setup on the server for the default site. There is only one site on the ISPconfig server right now.

falko 14th March 2012 19:31

Try
Code:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}


n0fx 14th March 2012 23:12

Quote:

Originally Posted by falko (Post 275499)
Try
Code:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}


Thanks, do I need to enable SSL and get a certificate before I can do the mod_rewrite? I tried the other code I posted before but it doesn't work, so I had a feeling I needed to enable SSL and get a certificate before I can forward requests to the http:// part of the site?

falko 15th March 2012 18:50

Apache cannot handle SSL requests if you don't enable SSL, so yes, you must enable it.

n0fx 15th March 2012 18:51

Quote:

Originally Posted by falko (Post 275584)
Apache cannot handle SSL requests if you don't enable SSL, so yes, you must enable it.

That's what I thought but had to double check, thanks :)


All times are GMT +2. The time now is 20:37.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.