-1
I would like to know how do I accept my URL bar at the end /
, since this way, when I add bar, the images and 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 doubts about how I should get this URL:
$_GET['page']
Should I or should I not validate this URL, or in the manner described, any error is directed to page 404?
http://localhost/minha-idééééé
http://answall.com/a/106409/4793
– Daniel Omine
Possible duplicate of CSS and Javascript files do not load when I use Amigavel URL
– Daniel Omine