url_matcher1.apache 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # skip "real" requests
  2. RewriteCond %{REQUEST_FILENAME} -f
  3. RewriteRule .* - [QSA,L]
  4. # foo
  5. RewriteCond %{REQUEST_URI} ^/foo/(baz|symfony)$
  6. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:foo,E=_ROUTING_bar:%1,E=_ROUTING_def:test]
  7. # bar
  8. RewriteCond %{REQUEST_URI} ^/bar/([^/]+?)$
  9. RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [NC]
  10. RewriteRule .* - [S=1,E=_ROUTING__allow_GET:1,E=_ROUTING__allow_HEAD:1]
  11. RewriteCond %{REQUEST_URI} ^/bar/([^/]+?)$
  12. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:bar,E=_ROUTING_foo:%1]
  13. # baragain
  14. RewriteCond %{REQUEST_URI} ^/baragain/([^/]+?)$
  15. RewriteCond %{REQUEST_METHOD} !^(GET|POST|HEAD)$ [NC]
  16. RewriteRule .* - [S=1,E=_ROUTING__allow_GET:1,E=_ROUTING__allow_POST:1,E=_ROUTING__allow_HEAD:1]
  17. RewriteCond %{REQUEST_URI} ^/baragain/([^/]+?)$
  18. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baragain,E=_ROUTING_foo:%1]
  19. # baz
  20. RewriteCond %{REQUEST_URI} ^/test/baz$
  21. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz]
  22. # baz2
  23. RewriteCond %{REQUEST_URI} ^/test/baz\.html$
  24. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz2]
  25. # baz3
  26. RewriteCond %{REQUEST_URI} ^/test/baz3$
  27. RewriteRule .* $0/ [QSA,L,R=301]
  28. RewriteCond %{REQUEST_URI} ^/test/baz3/$
  29. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz3]
  30. # baz4
  31. RewriteCond %{REQUEST_URI} ^/test/([^/]+?)$
  32. RewriteRule .* $0/ [QSA,L,R=301]
  33. RewriteCond %{REQUEST_URI} ^/test/([^/]+?)/$
  34. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz4,E=_ROUTING_foo:%1]
  35. # baz5
  36. RewriteCond %{REQUEST_URI} ^/test/([^/]+?)/$
  37. RewriteCond %{REQUEST_METHOD} !^(POST)$ [NC]
  38. RewriteRule .* - [S=2,E=_ROUTING__allow_POST:1]
  39. RewriteCond %{REQUEST_URI} ^/test/([^/]+?)$
  40. RewriteRule .* $0/ [QSA,L,R=301]
  41. RewriteCond %{REQUEST_URI} ^/test/([^/]+?)/$
  42. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz5,E=_ROUTING_foo:%1]
  43. # baz6
  44. RewriteCond %{REQUEST_URI} ^/test/baz$
  45. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz6,E=_ROUTING_foo:bar\ baz]
  46. # baz7
  47. RewriteCond %{REQUEST_URI} ^/te\ st/baz$
  48. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz7]
  49. # 405 Method Not Allowed
  50. RewriteCond %{_ROUTING__allow_GET} !-z [OR]
  51. RewriteCond %{_ROUTING__allow_HEAD} !-z [OR]
  52. RewriteCond %{_ROUTING__allow_POST} !-z
  53. RewriteRule .* app.php [QSA,L]