I have been developing this site and I have finally got around to doing the mod rewrite. i have a dynamic page www.myserver.com/listings.php?houseid=1. I have the rewrite now working with www.myserver.com/listings/1 I am more than happy with this address. The one thing I need to do is include the slash at the end of the url ie www.myserver.com/listings/1/ so that if they put this in the address bar that it directs them to www.myserver.com/listings/1. Since I am new at this rewriting I am not quite sure what is going on in the background. My issue is the links that I have on the page are all broken. But they work if I put absolute links. Is this what is required for it to work? Since it is only a few dynamic pages that I have to change it is no big deal but if i had 100 pages to change I would be a bit frustrated. So is there a way to deal with this. Maybe in the htaccess where my rewrite rules are? thanks
You want to redirect the URLs with the slash at the end to the same URL without the slash? Try this. RedirectMatch 301 ^listings\/([\d]+)\/$ listings/$1 Code (markup):