I have created a basic Routing-system in PHP. The url is split into an array, so that i can decide what to show depending on the URL (ex: www.domain.com/page/option/param).
So in my index.php I've defined a div for header, content and footer, and the /page/ determines which file to include in the content-div. The routing works, and the HTML is loaded, but the stylesheet doesn't seem to be. Neither does it work when I <link>
the stylesheet directly in the file (and supposedly it's possible to link a stylesheet within the body, with the attribude itemprop
rather than rel
) - anyways, does anyone know what could be causing this?
.htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?uri=$1 [QSA,L]
My routing uses $_SERVER['REQUEST_URI']
to get the URL, and i then remove the /index and split the rest into an array - all of this works fine.
Thanks in advance.