How to load CSS when using Friendly URL in Apache?

1

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

Because the load stays like this anyway:

Following 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>
    
asked by anonymous 29.11.2017 / 19:25

1 answer

2

I noticed that you are using HTTPS too. I do not know if it is already doing this, but I believe you can try to include the .css file through the absolute URL.

Ex:

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