I'm having a problem sending a form, as I'm using a schema that changes the pages as GET['page']
, and I used the friendly url to take all that code to leave only the name of the page, for example localhost?page=inicio
, is now localhost/inicio
.
But I have a problem with this because when I need to send another get
, php can not get it, because the form sends the " ?
" in front of the get, and php will only catch if the html send " &
" before the GET name
Example of how it is happening: localhost/inicio?b=pedro
, this means localhost?page=inicio?b=pedro
How do I stay like this localhost/inicio&b=pedro
, which will look like this without the friendly url localhost?page=inicio&b=pedro
.
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/]*)$ index.php?page=$1
RewriteRule ^([^/]*)/$ index.php?page=$1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php