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

Popular posts from this blog

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

Change the color of an oval at click in Java AWT -