My goal is to redirect from domain.com/app/public/index.php?route=news/test/action
to domain.com/news/test/action
.
I used the following regex:
RewriteRule ^([A-Za-z0-9-/]*)$ app/public/index.php?route=$1 [NC]
This works when I call domain.com/news/test
.
Now I want to also consider files to be routed so I include dots (.) in the regex like this:
RewriteRule ^([A-Za-z0-9-/.]*)$ app/public/index.php?route=$1 [NC]
Now when I call domain.com/news/test
the output of $1 is not news/test
but app/public/index.php
.
What happened?