Looking for help forcing SSL on a website
Permalink
Hey all,
I'm having 'trouble' forcing SSL onto a C5 site. In all honesty, I'm pretty lost...
The main site ishttp://www.spinfarming.com (which returns the legit SSL certificate).
C5 is installed in a sub-directory /buy2 (which will replace /buy once going live). All images and such are accessible through https:// on the main site
as well as any image I upload in the C5 directory, wether it be in the file manager
or an image called through some CSS, like in the navigation
However, no image nor links are being forced to https://. All links and images are relative...
Adding the appropriate SITE_URL in site.php just breaks the site with an infinate loop:
Editing the url_check.php on line 6 doesn't help either:
the /buy2/.htaccess file reads as follows:
http://joseph.randomnetworks.com/2004/07/22/redirect-to-ssl-using-a...
I have tried turning on and off all these individually and together.
The one interesting combination is when I have url_check.php read 'https' and the site_url set to https, then the link in the left nav for Be A Spin Farmer will read 'https://www.spinfarming.com/buy2/', but it simply forwards tohttp://www.spinfarming.com/buy2/....
Additionally, all CSS in the /elements/header.php are pulled using:
As according to Jordan Lev, using getStyleSheet can ignore the BASE_URL (http://www.concrete5.org/community/forums/chat/how-to-install-ssl/)
Any advice you can give would be awesome. :)
Best,
Joel
I'm having 'trouble' forcing SSL onto a C5 site. In all honesty, I'm pretty lost...
The main site ishttp://www.spinfarming.com (which returns the legit SSL certificate).
C5 is installed in a sub-directory /buy2 (which will replace /buy once going live). All images and such are accessible through https:// on the main site
https://www.spinfarming.com/common/images/logo.gif
as well as any image I upload in the C5 directory, wether it be in the file manager
https://www.spinfarming.com/buy2/files/3713/4445/5406/logo_218x100.png
or an image called through some CSS, like in the navigation
https://www.spinfarming.com/buy2/themes/spinfarming/images/sprite_text_580x47.jpg
However, no image nor links are being forced to https://. All links and images are relative...
Adding the appropriate SITE_URL in site.php just breaks the site with an infinate loop:
Editing the url_check.php on line 6 doesn't help either:
$protocol = 'https://';
the /buy2/.htaccess file reads as follows:
# -- concrete5 urls start -- <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /buy2/ # RewriteCond %{HTTPS} off # RewriteRule (.*)https://%{HTTP_HOST}%{REQUEST_URI}... [R,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}/index.html !-f RewriteCond %{REQUEST_FILENAME}/index.php !-f RewriteRule . index.php [L] </IfModule> # -- concrete5 urls end -- RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
http://joseph.randomnetworks.com/2004/07/22/redirect-to-ssl-using-a...
I have tried turning on and off all these individually and together.
The one interesting combination is when I have url_check.php read 'https' and the site_url set to https, then the link in the left nav for Be A Spin Farmer will read 'https://www.spinfarming.com/buy2/', but it simply forwards tohttp://www.spinfarming.com/buy2/....
Additionally, all CSS in the /elements/header.php are pulled using:
$this->getThemePath() . '/style.css'
As according to Jordan Lev, using getStyleSheet can ignore the BASE_URL (http://www.concrete5.org/community/forums/chat/how-to-install-ssl/)
Any advice you can give would be awesome. :)
Best,
Joel
Wondering if you got further than me!
Jos