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.
We use the same method with no redirect problems.
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
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.
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?
If you manually go to the https:// version of the page does it redirect to http://? It may be your server setup.
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;
}
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?
We force SSL on all pages at the server level via htaccess
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community