0
Wie umschreiben mehrere Regeln in. Htaccess-Datei? Apache mehrere Rewrite-Regel
Das folgende ist meine .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/download(.*)$
RewriteRule ^(.*)/download/(.*)$ download/$2 [L]
RewriteCond %{REQUEST_URI} ^/file(.*)$
RewriteRule ^(.*)/file/(.*)$ file/$2 [L]
RewriteRule ^(.*)$ main/$1 [L]
</IfModule>
Wenn Anfrage-URL ist http://localhost/ {Download} /foo.php wird dann laufen download/foo.php
Wenn Anfrage-URL ist http://localhost/ {file} /foo/bar.php dann wird file/foo/bar.php laufen
Wenn nicht in Regeln dann läuft main/index.php