.htaccess forcetype masking of url variables

Hi,

I’m trying to use htaccess forcetyping files as php which appears to be working. For example typing http://www.example.com/pages/location will render the location file as a php page, additionally if http://www.example.com/pages/location/test is typed then ‘test’ can be processed by some simple code accessing path variables as a variable to be used.

However the issue arises with my externally linked images/css etc that utilise relative paths e.g. an image in the full route path http://www.example.com/images/test.jpg is linked to using <img src="…/images/text.jpg" /> from a page in ‘pages’ however if using the ‘/’ delimiter url masking technique with ‘test’ on the end (as above) the relative url appears to turn to location/images as opposed to staying on /images.

Is there a way round this where I can maintain the ‘pretty urls’ and use relative paths from the file i.e. excluding seeing the path variables as directories

Cheers in advance