ruslango

nginx 301 redirect to no-www

Oct 24th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name www.ruslango.ru;
  4. rewrite ^ http://ruslango.ru$request_uri? permanent;
  5. }
  6.  
  7. server {
  8. listen 80;
  9. server_name ruslango.ru;
  10. root /home/www/ruslango.ru;
  11. index index.php;
  12.  
  13. location / {
  14. try_files $uri $uri/ /index.php?q=$uri&$args;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment