I want to implement CNC.

I have this:

http://localhost/site/f2.php?id=6

I want this:

http://localhost/site/f2/6

I write like this:

 #RewriteEngine on #RewriteRule ^f2/([0-9]+)/? f2.php?id=$1 [L] 

The page you need goes out, but without loading css styles. Why is that? It seems to do everything right, I will be glad of any help. Maybe a link to create CNC. Everything I found is somehow dryly written. Thank you very much!

  • Write absolute paths to css and you will be happy - Alex Kapustin
  • Thank! And so I wrote everything right? - qwerty17 pm
  • wrote like that. all the same page as if without styles (((<link href = " localhost / site / style.css " rel = "stylesheet" type = "text / css"> - qwerty17

1 answer 1

If you write ^ (starts with), then specify $ (end of line).

You will have this: ^f2/([0-9]+)(/?)$ .

  • I checked the rights to the styles? - crazy_xela 2:44 pm
  • How to check them and why is it necessary? - qwerty17
  • wrote like this RewriteRule ^ f2 / ([0-9] +) (/?) $ f2.php? firm = $ 1 [L] and still there are no styles - qwerty17
  • when you go to this url localhost / site / f2.php? id = 6 are there any styles at all? and I would like to take a look at .htaccess myself - crazy_xela