3 ms·
That's actually more complicated than it needs to be, see http://wiki.nginx.org/Pitfalls#Taxing_Rewrites http://wiki.nginx.org/Pitfalls#Taxing_Rewrites Bad:
by k33l0r 14y ago
That's actually more complicated than it needs to be, see http://wiki.nginx.org/Pitfalls#Taxing_Rewrites http://wiki.nginx.org/Pitfalls#Taxing_Rewrites
Bad:
rewrite ^/(.*)$ http://domain.com/$1 permanent;
Good:
rewrite ^ http://domain.com$request_uri? permanent;
Better:
return 301 http://domain.com$request_uri;
- epoxyhockey 14y agoAwesome - thanks!