Support the ongoing development of Laravel.io →
posted 10 years ago
Requests
Last updated 2 years ago.
0

If you want this for all URLs you'd probably be better of implementing this at nginx level. In case of a normal nginx install I'd simply make a special non-https server block that redirects all requests to the https server block. I don't know Vaprobash.

Last updated 2 years ago.
0

We use the same method with no redirect problems.

Last updated 2 years ago.
0

I think in Nginx, ya'll might benefit from this "rewrite rule", to enforce the use of SSL - http://serverfault.com/questions/250476/how-to-force-or-redirect-to-ssl-in-nginx

Last updated 2 years ago.
0

In the event there are some instances where specific, dynamic routes, require SSL, a rewrite rule isn't recommended.

I use this method on L 4.1.16.

Last updated 2 years ago.
0

jaketoolson said:

In the event there are some instances where specific, dynamic routes, require SSL, a rewrite rule isn't recommended.

I use this method on L 4.1.16.

Same here. Alternatives?

Last updated 2 years ago.
0

If you manually go to the https:// version of the page does it redirect to http://? It may be your server setup.

Last updated 2 years ago.
0

I use this on Nginx. Also works well for subdomains. Rewrite rules should be avoided if possible.

server {
    listen 80;
    server_name domain.com *.domain.com;
    return 301 https://$host$request_uri;
}
Last updated 2 years ago.
0

But then I still have to rewrite all code so it'll take secure links for everything?

echo link_to('foo/bar', $title, $attributes = array(), $secure = true);

Isn't there some global thing like I used before, to "rewrite" al code to go to the secure route?

Last updated 2 years ago.
0

We force SSL on all pages at the server level via htaccess

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Jaspur jaspur Joined 14 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.