# HG changeset patch # User Markus Bröker # Date 1447362107 -3600 # Node ID 0cbee2939c40074bc51aa60296366e47f356a4ac # Parent d9298ea00d20398356b98db288e5220544a26579 htaccess: Umstellung auf 2 Parameter - /controller/action/ diff --git a/.htaccess b/.htaccess --- a/.htaccess +++ b/.htaccess @@ -1,14 +1,24 @@ + + # Enable rewrite engine RewriteEngine on + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_URI} !(.*)/$ + RewriteRule ^(.*)$ /$1/ [R,L] + + # Specify a base URL-path for the rules RewriteBase / + + # zwei parameter RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_URI} !(.*)/$ - RewriteRule ^(.*) $1/ [R,L] + RewriteCond %{REQUEST_URI} ^/(.*)/(.*)/$ [NC] + RewriteRule .* index.php?controller=%1&action=%2 [L] + # ein parameter RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_URI} (.*)/$ [NC] - RewriteRule ^(.*)/$ /?page=$1 [L,QSA] + RewriteCond %{REQUEST_URI} ^/(.*)/$ [NC] + RewriteRule .* index.php?controller=%1 [L]