0
I’m writing my api using . htaccess-friendly urls to do the redirects.
When I need to pass a second parameter, I’m having problems
My file . htaccesss is like this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteRule ^mesas\/?([0-9]+)\/?(.+)\/?$ mesas.php?status=$1
RewriteRule ^statusmesa\/?([0-9]+)\/?(.+)\/?$ statusmesa.php?idmesa=$1&status=$2
When I use the call to statusmesa using statusmesa/2/3
, it returns as first parameter the 2
and as a second 5.php/2/5
What’s wrong with my rule?
It didn’t work. It would have something to do with the Rewriterule rule (.*)$1.php?
– Murilo
@Murilo Ai can no longer tell you, I never used it, when I did, I used the name of the direct file.
– Matheus Ribeiro