sslonly and stg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings. 

There's been a long standing issue with sslonly sites and stg. 

When you go to 'http://site.stg.whatever"; you are redirected to
'https://site.whatever' which is anoying. 

The current sslonly template has: 

<% if sslonly -%>
  Redirect 301 / https://<%= name %>/
<% else -%>

So it does a redirect to the site 'name' which is always the production
one. 

I'd like to fix this, and changing the above Redirect to: 

  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^(.+)$ [NC]
  RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

seems to work. I tested it on stg with the qa site. 

Can anyone see anything that would blow up if I made this change? 

kevin

Attachment: signature.asc
Description: PGP signature

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux