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

c# - Unity IoC Lifetime per HttpRequest for UserStore -

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

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -