Problem with 'Clean URLs Tutorial' (.htaccess)

Hey, I’m not entirely sure if it’s a problem that can be solved with .htaccces, but basically my javascript on my site doesn’t seem to like being confronted with an extra ‘/’ at the end of a URL.

e.g.
http://www.mysite.com/page - works fine.
http://www.mysite.com/page/ - error.

I used the .htaccess example given on the ‘Clean URLs’ tutorial to take ‘page’ in as a variable in a PHP script - that works fine. Infact, everything works fine except when it comes to javascript.

Is there a way to just delete that extra ‘/’ even if the user types it in? I’m clueless lol.

Cheers,

Rhuaridh