How do I load CSS when using Apache-Friendly URL?

Asked

Viewed 185 times

1

My CSS does not load the content when I started using the user-friendly URL. Try using the tag <base href="localhost/guiacomercial/" /> and within the .htaccess RewriteBase /

'Cause the shipment gets like this anyway:

inserir a descrição da imagem aqui

Follow the . htaccess code:

<IfModule mod_rewrite.c>

  RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

  RewriteRule ^es/guarapari\/?$ cidade.php?acessando=contato [L]

</IfModule>

1 answer

2


I noticed you’re using HTTPS as well. I don’t know if you’re already doing it this way, but I believe you can try to include the file .css through the absolute URL.

Ex.:

<link type="text/css" rel="stylesheet" href="https://localhost/guiacomercial/path_to_css/estilo.css">

Browser other questions tagged

You are not signed in. Login or sign up in order to post.