Advertisement
sandyd

Nginx YOURLS rules

Nov 2nd, 2011
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. location / {
  2. # If the file exists as a static file serve it directly without
  3. # running all the other rewite tests on it
  4. if (-f $request_filename) {
  5. expires max;
  6. break;
  7. }
  8.  
  9. if (!-f $request_filename){
  10. set $rule_0 1$rule_0;
  11. }
  12.  
  13. if (!-d $request_filename){
  14. set $rule_0 2$rule_0;
  15. }
  16.  
  17. if ($rule_0 = "21"){
  18. rewrite ^/.* /yourls-loader.php last;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement