url_matcher1.apache 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # foo
  2. RewriteCond %{PATH_INFO}, ^/foo/(baz|symfony)$
  3. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:foo,E=_ROUTING_bar:%1,E=_ROUTING_def:test]
  4. # bar
  5. RewriteCond %{REQUEST_METHOD} !^(get|head)$ [NC]
  6. RewriteRule .* - [S=1,E=_ROUTING__allow_get:1,E=_ROUTING__allow_head:1]
  7. RewriteCond %{PATH_INFO}, ^/bar/([^/\.]+?)$
  8. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:bar,E=_ROUTING_foo:%1]
  9. # baz
  10. RewriteCond %{PATH_INFO}, ^/test/baz$
  11. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz]
  12. # baz2
  13. RewriteCond %{PATH_INFO}, ^/test/baz\.html$
  14. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz2]
  15. # baz3
  16. RewriteCond %{PATH_INFO}, ^/test/baz3/$
  17. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz3]
  18. RewriteCond %{PATH_INFO}, ^/test/baz3$
  19. RewriteRule .* /$0/ [QSA,L,R=301]
  20. # baz4
  21. RewriteCond %{PATH_INFO}, ^/test/([^/\.]+?)/$
  22. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz4,E=_ROUTING_foo:%1]
  23. RewriteCond %{PATH_INFO}, ^/test/([^/\.]+?)$
  24. RewriteRule .* /$0/ [QSA,L,R=301]
  25. # baz5
  26. RewriteCond %{REQUEST_METHOD} !^(post)$ [NC]
  27. RewriteRule .* - [S=2,E=_ROUTING__allow_post:1]
  28. RewriteCond %{PATH_INFO}, ^/test/([^/\.]+?)/$
  29. RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz5,E=_ROUTING_foo:%1]
  30. RewriteCond %{PATH_INFO}, ^/test/([^/\.]+?)$
  31. RewriteRule .* /$0/ [QSA,L,R=301]