This problem concerns me for a long time. I admit that it is probably because of lack of experience so I hope I could get some ideas.
Here is the code in .htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^view-([0-9]+)$ view.php?id=$1 [NC,QSA]
So when I access http://domain/project/view-44 it works fine, but I would like it to work with a slash in the end like http://domain/project/view-44/
So I changed the last line to
RewriteRule ^view-([0-9]+)/$ view.php?id=$1 [NC,QSA]
And now when I access http://domain/project/view-44/ all the images, javascripts and style is gone.
Now, instead of getting the css from http://domain/project/style.css it tries to get it from http://domain/project/view-44/style.css
I believe the issue is about incorrect way of specifying url for items. In my case it is simply
<link rel="stylesheet" type="text/css" href="style.css" >
<img src="images/web/showreel.png" alt="Image1" />
Does that mean that I have to specify a full url ( http://domain/project/images/web/showreel.png ) in every required element?