I have something like that :
.htaccess :
RewriteRule ^news/?(\d+)/?$ /?pg=news&id=$1 [NC]
header.php :
<link rel="stylesheet" href="../theme/style.css" media="all" >
The problem is the following : when i go to http://www.domain.com/news/241 i get the error “404 Not Found” of the style.css file.
I replaced the ../theme/style.css with <?=HOST;?>/theme/style.css where HOST is the domain name. How to do it better?
Just use absolute paths for all your links / assets (js, css, images, etc.):