Pergunta

I have a simple PHP gear set up on OpenShift. I had everything working well until I added a custom alias for my own domain. I am on the free option and don't have the ability to configure an SSL certificate, and I don't want to, this site is very simple.

The problem that I get is that its forcing my alis to https even though I have not set that up. I also haven't configured any apache rewrites to force ssl.

For my DNS settings I am just pointing the www cname to my gear as they explained, I have not done anything in the DNS so force ssl.

According to this there was a similar bug: Prevent https on Openshift

It says that particular problem was resolved (that was a year ago) but I am still getting this.

Here is my URL so you can see what it is doing: www.libertypuppies.us

When you go there it will force you to https and warn you that the certificate is not trusted.

This is on a php gear. I have no other gears, just the one.

How do I configure it to not force SSL and just stay on http?

EDIT (more info):

I tried the following in .htaccess but it didn't work. Either I wrote the rewrite wrong or the problem is higher up:

RewriteEngine on
RewriteCond %{HTTPS:X-Forwarded-Proto} !http  
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [R,L]

I also tried:

RewriteEngine on
RewriteCond %{HTTPS} off

And this:

RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

None of which worked. If you notice when you go to the site it also adds /app to the path.

Foi útil?

Solução 2

Must have been something internal with OpenShift. I deleted the alias and made it again. Now it works.

Outras dicas

You can use the mod_rewrite in your .htaccess to make redirect all traffic to http.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top