Guest User

Untitled

a guest
Jul 18th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. # mod_rewrite
  2. RewriteEngine On
  3.  
  4. # lets replace all the /var1/value1 found after the controller/action by &var1=$value1 query string
  5. # mod_rewrite is looping here if the rule matches
  6. RewriteRule ^/([^/]+)/([^/]+)/(?:(&[^/]+=[^/]+)/)*([^/]+)/([^/]+)(.*) /$1/$2$3&$4=$5$6 [QSA,NS,N]
  7.  
  8. # lets replace the controller/action per the appropriate query string
  9. RewriteRule ^/([^/]+)?/?([^/]+)?([^/]*) %{ENV:Rewrite-Folder}/index.php?_controller=$1&_action=$2$3 [QSA,NS,L]
Add Comment
Please, Sign In to add comment