Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 13th, 2007, 01:55 PM
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 http://www.mysite.com/manual/chapters/tableofcontents the first time everything works correctly.
Now when I select the link above my page goes to http://www.mysite.com/manual/chapters/tableofcontents/9 everything on the page appears fine,
but now my links change too http://www.mysite.com/manual/chapter...leofcontents/9 then everytime afterwards it keeps adding a tableofcontents/

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

Thanks Mike
__________________
Peace
Mike
http://www.eclecticpixel.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_rewrite stevenpup ASP.NET 2.0 Basics 2 December 22nd, 2007 05:54 PM
mod_rewrite question harpua Pro PHP 0 April 12th, 2007 08:56 PM
Mod_rewrite heerajee Pro PHP 1 March 8th, 2006 06:35 AM
mod_jk + apache + mod_rewrite fanch Apache Tomcat 0 December 5th, 2005 12:34 PM
Apache mod_rewrite() anshul Linux 2 October 14th, 2005 09:09 AM



All times are GMT -4. The time now is 08:59 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.