Hi. For one project I use a web hosting service. I wanted the entire site to be https, so I bought a service from them in which they automatically install a trusted cert so people can access the site through https protocol. Since http is still available, though, I need to do automatic rewrites or something to change http into https requests. (I don't have access to their Apache server configuration files or anything like that.)
I found on the net this code to add to my .htaccess file:
Code:
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
However, I already have this in my .htaccess file, for my Ruby app:
Code:
# General Apache options
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)/!$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
ErrorDocument 500 "Application error Application failed to start properly"
Whenever I try to integrate the two there are bad results; it seems that it somehow changes the programming so that all requests end up being handled by the dispatch script, rather than only requests that don't specify a static file. Could someone who understands how .htaccess files work recommend a solution?