Guest User

Untitled

a guest
Oct 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. http://www.example.com/my_dir/value/
  2.  
  3. http://www.example.com/my_dir/filename.php?parameter=value
  4.  
  5. Case #1:
  6. location /my_dir/ {
  7. if ($args ~* "filename.php/?parameter=value1") {
  8. rewrite ^ http://www.example.com/my_dir/$arg_param1? last;
  9. }
  10. }
  11.  
  12. Case #2:
  13. rewrite ^/my_dir/(.*)$ /filename.php?parameter=$1 last;
  14.  
  15. Case #3:
  16. location /my_dir {
  17. try_files $uri $uri/ my_dir/filename.php?$args;
  18. }
  19.  
  20. Case #4:
  21. location /my_dir/ {
  22. rewrite ^/my_dir/filename.php?parameter=(-+([a-zA-Z0-9_-]+))?$ /filename.php?parameter=$1 last;
  23. }
  24.  
  25. try_files my_dir my_dir/ /my_dir/filename.php?$args;
Add Comment
Please, Sign In to add comment