I would like to know how do I make my URL accept bar at the end /
, because in the way that this, when I add bar, the images and the css are based on the URL with the parameter, generating error in loading. >
http://localhost/pagina/index.php?page=minha-ideia
http://localhost/minha-ideia
http://localhost/minha-ideia/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?page=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?page=$1
</IfModule>
Finally, I have questions about how I should get this URL:
$_GET['page']
Should I validate this URL, or in the manner described, is any error directed to page 404?
http://localhost/minha-idééééé