friendly urls, return to directory

0

Good afternoon, I have a question, I implemented friendly urls for a page of my website. This way,

RewriteEngine ON

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

RewriteRule ^investimentos/(.*)/(.*)/(.*)/(.*)$ anuncio.php?id=$3&acao=$4

It worked perfectly, the problem is that on this page to get for example the css I have to do ../../../../******.css or an image or links, I have to (I think there are 4 folders), is there any way I can not do this?

    
asked by anonymous 02.07.2015 / 19:59

1 answer

0

Use the address of your site in the address of your css and images.

For example: Here's how:

<link href="http://www.teusite.com/assets/_css/estilo.css" rel="stylesheet" type="text/css" />

Instead of:

<link href="../assets/_css/estilo.css" rel="stylesheet" type="text/css" />
    
04.07.2015 / 20:47