View Single Post
  #1 (permalink)  
Old April 13th, 2007, 01:55 PM
harpua harpua is offline
Friend of Wrox
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default link problem with mod_rewrite

Does anybody work with mod_rewrites and could help me understand this, I am new to using these and I have spent alot of time trying to figure this out. Any help is greatly appreciated.

This is my php being pulled from the DB
$strRet .= "[list]";
while ($row = mysql_fetch_array($result)) {
$strRet .= "<li>";
$strRet .= "<a href=\"tableofcontents/{$row['chapterID']}\">{$row['chapterTitle']}</a>";
$strRet .= "</li>";
$strRet .= "</ul>";

I am using this RewriteRule
RewriteRule ^manual/chapters/tableofcontents/?([0-9]+)? manual/chapters/tableofcontents.php?chapter=$1

What I am not understanding is that when I come to the link the first time everything works correctly.
Now when I select the link above my page goes to everything on the page appears fine,
but now my links change too then everytime afterwards it keeps adding a tableofcontents/

My question is why would it keep adding that table of contents?

Thanks Mike
Reply With Quote