Esta es mi estructura de archivos: puedes verla aquí o
-recursos/
--css/
---index.css
-origen/
--puntos de vista/
---principal.vista.php
--principal.php
índice.php
.htaccess
Este es mi .htaccess:
RewriteEngine On RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]Así es como incluyo el CSS en la vista.
<link rel="stylesheet" href="resources/css/index.css">Problema: cuando incluyo main.php (que incluye la vista) en index.php, el CSS no funciona sin importar dónde coloque index.css. ¿Alguna pista?
Debe agregar una regla para excluir la reescritura de activos
#Checks to see if the user is attempting to access a valid file, #such as an image or css document, if this isn't true it sends the #request to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(index\.php|images|robots\.txt|css)