No właśnie też tak logicznie myślałem, ale otrzymuję 500.
Całość:
RewriteEngine On
RewriteRule ^cms /Cms/index.php/$1 [L]
RewriteRule ^.*$ /App/index.php/$1 [L]
Otrzymałem odpowiedź na Stackoverflow i umieszczam rozwiązanie poniżej.
Dzięki wszystkim zainteresowanym
Cytat
Note that apache doesn't run the rewrite-rules just once. It tries applying the rules until the url no longer changes (this makes mod_rewrite extremely powerful). That is why you get the error. The rules are creating a redirect loop.
e.g /cms/test directs to /Cms/index.php/test, which in turn is matches by the second rule, causing it to direct to /App/index.php/Cms/index.php/test, this url get matched again by the second rule, directing it to /App/index.php/App/index.php/Cms/index.php/test etc.
To prevent this loop, add a rewrite-condition:
RewriteEngine On
RewriteRule ^cms /Cms/index.php/$1 [L]
RewriteCond %{REQUEST_URI} !^/(Cms|App)
RewriteRule ^.*$ /App/index.php/$1 [L]