I have an existing htaccess-file that redirects to a subfolder. It is necessary to have an trailing slash.
I have add a rule that redirects to an url with a trailing slash, but since then the other rules are never met.
RewriteEngine On
RewriteRule ^(.*)$ /$1/ [C,R=302] #301 when everything works fine :)
RewriteRule ^app/(.*)$ webapp/PNJ/client/frontend/$1 [QSA,L]
RewriteRule ^pnj_be/(.*)$ webapp/PNJ/client/backend/$1 [QSA,L]
The C in the first rule should chain the rules, but I don't know why the rules are never met. If I write manually http://example.com/app/ the rules are accepted. If I dont't add the trailing slash, I will get redirected to the URL with the correct url, but then the browser can't find any files.
Can anyone explain why this doesn't work? Or give a hint, what the right solution is?