php - Sef URL CSS Problems -
i try create search engine friendly urls this;:
rewriterule ^m/([0-9]+)$ my.php?id=$1
however, gets page without css.
if write this:
rewriterule ^([0-9]+)$ my.php?id=$1
it gets page css without problem.
how can solve it?
when write css references this:
<link rel="stylesheet" type="text/css" href="style.css">
it's relative url. on http://example.com/
, points http://example.com/style.css
, on http://example.com/my/1
points http://example.com/my/style.css
, doesn't exist.
using absolute url fixes this:
<link rel="stylesheet" type="text/css" href="/style.css">
Comments
Post a Comment