What is normally done (I use laravel but I want to have the route system with the Php common):
www.mipagina.com/index.php?pagina=contacto
As I need it:
www.mipagina.com/contacto /
What is normally done (I use laravel but I want to have the route system with the Php common):
www.mipagina.com/index.php?pagina=contacto
As I need it:
www.mipagina.com/contacto /
Good afternoon, I recommend using a router like: link It's very easy to configure and you can make all friendly URLs very easy.
As you put in the documentation you will only have to edit the .htaccess and put.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
Add these rules to .htaccess
:
RewriteBase /
RewriteEngine On
RewriteRule ^$ index.php?/ [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?pagina=$1 [QSA,L]
Where pagina
is the string you will receive for the URL