Apache - MIME type is not a supported stylesheet MIME type

 
Vista:
sin imagen de perfil
Val: 3
Ha disminuido su posición en 6 puestos en Apache (en relación al último mes)
Gráfica de Apache

MIME type is not a supported stylesheet MIME type

Publicado por Koy (2 intervenciones) el 02/05/2019 16:34:35
Saludos, he subido mi sitio (con php) de prueba a 000webhost.com, pero al intentar visualizarlo no carga ni los CSS ni los JS, en la consola me muestra los siguientes mensajes, tanto para JS como para CSS:


1
2
3
Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled
 
Refused to execute script from '<URL>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

yo llamo los css y js asi:

1
2
3
<link rel="stylesheet" type="text/css" href="<?php echo URL . VIEWS . DFT; ?>Css/cssxyz.min.css">
 
<script src="<?php echo URL . VIEWS . DFT; ?>Js/jsxyz.min.js" type="text/javascript"></script>

las rutas son correctas y las mayúsculas y minúsculas también

en el foro de 000webhost.com dice que debo modificar el .htaccess para que me reconozca los tipos de archivo que necesite llamar, hice algunos ajustes y generó un error 401, asi que revertí ese cambio

en este momento el contenido de mi .htaccess es el siguiente:


1
2
3
4
5
6
7
8
#Activacion de RewriteEngine
RewriteEngine on
 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
 
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

no conozco mucho sobre configurar apache, les agradezco la ayuda que me puedan prestar
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de joel
Val: 100
Oro
Ha mantenido su posición en Apache (en relación al último mes)
Gráfica de Apache

MIME type is not a supported stylesheet MIME type

Publicado por joel (40 intervenciones) el 02/05/2019 18:49:47
El error es correcto, ya que los archivo CSS no son text/html, son text/css

Una vez cargada la pagina en un navegador, si haces ver código fuente, que te aparece en la linea?
<link rel="stylesheet" type="text/css" href=....>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil
Val: 3
Ha disminuido su posición en 6 puestos en Apache (en relación al último mes)
Gráfica de Apache

MIME type is not a supported stylesheet MIME type

Publicado por Koy (2 intervenciones) el 03/05/2019 00:19:35
esto me genera mi codigo:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Css/fontawesome/css/all.css">
<link rel="stylesheet" type="text/css" href="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Css/all.css">
<link href="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Css/bootstrap-table-master/dist/bootstrap-table.min.css" rel="stylesheet" type="text/css" >
<link rel="stylesheet" type="text/css"  href="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Css/hover-min.css">
<link rel="stylesheet" type="text/css" href="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Js/jquery-ui/jquery-ui.min.css  ">
<link rel="stylesheet" type="text/css"  href="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Css/Style.css">
 
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Js/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Js/popper.min.js" type="text/javascript"></script>
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Js/core.min.js" type="text/javascript"></script>
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Css/bootstrap-table-master/dist/bootstrap-table.min.js" type="text/javascript"></script>
 
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Css/fontawesome/js/all.js"></script>
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Css/fontawesome/js/fontawesome.js"></script>
 
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Js/jquery-ui/jquery-ui.min.js"></script>
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Js/jquery.validate.js" type="text/javascript"></script>
 
<script src="https://infoshare123.000webhostapp.com/misitioxyz/Views/Default/Js/funciones.js" type="text/javascript"></script>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar