Why is the style sheet not loading?

3

I'm trying to use urls amigáveis but I'm having some problems in the learning process. The problem now is that the page does not return the page styles.

Options +FollowSymLinks

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

RewriteBase /
# RewriteRule ^(.*)$ index.php/$1 [L]
RewriteRule ^tratamentos/(.*) index.php?tratamentos=$1

I'm sending this url:

http://dent.axitech.com.br/tratamentos/aparelhos-dentarios

Question: Why does not the index return the styles?

    
asked by anonymous 15.11.2015 / 15:27

1 answer

1

I think the problem is because you're using RewriteBase in your htaccess. And since relative URLs are always calculated by following the base URL, it is likely that whenever you enter a page the base flips through this page itself, breaking the relative CSS links.

There are some topics in the stackoverflow in English of people who have had the same problem, I'll leave them here:

Consider adding the <BASE> tag to the head of your page, pointing to the root, always.

    
15.11.2015 / 15:36