Friendly urls, back to the directory

Asked

Viewed 29 times

0

Good afternoon, I have a doubt, 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 in this page to fetch for example the css I have to do .. /.. /.. /.. /********. css or an image or links, I always have to go back (I think there are 4 folders), there is some way not to have to do this?

1 answer

0

Use your website address in your css address and images.

For example: Do it like this:

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

In place of:

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

Browser other questions tagged

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