# Problem with 'Clean URLs Tutorial' (.htaccess)

**URL:** <https://forum.kirupa.com/t/problem-with-clean-urls-tutorial-htaccess/229044>\
**Category:** programming\
**Created:** [June 13, 2007, 4:40pm UTC](https://forum.kirupa.com/t/problem-with-clean-urls-tutorial-htaccess/229044 "2007-06-13T16:40:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhuaridhclark](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rhuaridhclark](https://forum.kirupa.com/u/rhuaridhclark)\
**Post date:** [June 13, 2007, 4:40pm UTC](https://forum.kirupa.com/t/problem-with-clean-urls-tutorial-htaccess/229044/1 "2007-06-13T16:40:31Z")

</div>

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](http://www.mysite.com/page) - works fine.  
[http://www.mysite.com/page/](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
