I want to change the url rules so that the output become like this:
http://localhost/project/report/public
http://localhost/project/salesorder/public
is the same to
http://localhost/project/report.php?public=Y
http://localhost/project/salesorder.php?public=Y
and i can still add another parameter behind the public so it could be like : http://localhost/project/report/public?year=2020
How to achieve this? this is my current htaccess to navigate everything to controller and to remove the .php in controller
site root .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* controller/$0 [L]
controller/.htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
Thankyou