sslonly and stg
seth vidal
skvidal at fedoraproject.org
Wed May 1 17:07:39 UTC 2013
On Wed, 1 May 2013 10:50:07 -0600
Kevin Fenzi <kevin at scrye.com> wrote:
> 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?
>
That looks fine.
-sv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20130501/6c47f9b9/attachment.sig>
More information about the infrastructure
mailing list