WebFaction
Community site: login faq
1
1

What I am trying to do is force all traffic to HTTPS. This is using php and Codeigniter which I previous had setup on nginx. So the aim is to have everything point to index.php (except images, css, files, etc) Currently there is no redirection occuring for HTTP(s) but it does appear to redirect to my index.php correctly.

This is my .htaccess

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteRule ^(.)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.
)$ index.php/$1 [L,QSA]

If anyone could point me in the right direction it would be most helpful. Thanks

asked 06 Nov '12, 07:10

YayAdrian
1113
accept rate: 0%

edited 07 Nov '12, 02:43

The first problem is that you have a syntax error on the last line. You have a curly brace at the end, which is a mismatch for the square brace before L; this could be breaking the chain.

(06 Nov '12, 17:46) waynek

Thanks. I've now fixed that but no change. http://carsharingadventure.com gets me the webfaction error page https://carsharingadventure.com redirects but looses the HTTPs

(07 Nov '12, 02:45) YayAdrian
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×225
×76
×75
×8

question asked: 06 Nov '12, 07:10

question was seen: 4,553 times

last updated: 07 Nov '12, 02:45

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM