3
I’m studying about routing, trying to (re)create a routing solution of mine.
I’ve always used the following .htaccess
to redirect my requests:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?url=$1 [L]
Then it was easy, just take the $_GET['url']
in the index.php
and treat it any way I want.
But I’ve come across the following .htacesss
:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
My doubt is how to catch what was passed, since it does not play the request on $_GET['url']
.
That’s right, thank you. Sanou my doubt :D
– José Camelo de Freitas