.htacces Appears only html with no CSS or PHP -
i've been wondering on internet on how work htacces(really hard learn it). , when lurking in internet, found this: http://www.generateit.net/mod-rewrite/
well, inserted url(working on localhost):empresa.com/index.php?p=sub_artigo&id=1&cat=mercearia
and gave me this(with options default):http://empresa.com/sub_artigo/5/mercearia.html
and .htacces code this:rewriterule ^([^/]*)/([^/]*)/([^/]*)\.html$ /index.php?p=$1&id=$2&cat=$3 [l]
and when generate url in php do
<a href=\"sub_artigo/".$response2['id_sub_artigo']."/".$response2['url'].".html\">$response2[nome_sub_artigo]</a>
and then, when click button, appears like, html. example: http://s14.postimg.org/wr137fx4x/htacces_error.jpg
any idea happening ?
it looks using relative links assets (images, javascript, css).
that means when css/my_stylesheet.css
, new url, browser request url http://empresa.com/sub_artigo/5/css/my_stylesheet.css
.
the easiest solution use absolute urls assets, /css/my_stylesheet.css
, etc.
Comments
Post a Comment