Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > What's wrong with my mod rewrite?

What's wrong with my mod rewrite?
Thread Tools
Junior Member
Join Date: May 2003
Status: Offline
Reply With Quote
Feb 29, 2004, 11:57 PM
 
Hey guys,

This is my mod rewrite code:

RewriteEngine on
RewriteRule ^gpbsd/member/(.*) gpbsd/member/index.php?id=$1

Then I call it using www.domain.com/gpbsd/member/membername

But it's returning "index.php" instead of "membername" as the id.

Any ideas? I really need some help with this!

Thanks!
Jon Marus
www.jmarus.com - kicks by JM
     
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Mar 1, 2004, 02:28 PM
 
RewriteEngine on
RewriteRule ^gpbsd/member/(*.) gpbsd/member/index.php?id=$1

maybe? just shootin in the dark, kinda bored right now :-p
Travis Sanderson
     
Grizzled Veteran
Join Date: Oct 2003
Status: Offline
Reply With Quote
Mar 1, 2004, 03:54 PM
 
Originally posted by jon31:
Hey guys,

This is my mod rewrite code:

RewriteEngine on
RewriteRule ^gpbsd/member/(.*) gpbsd/member/index.php?id=$1

Then I call it using www.domain.com/gpbsd/member/membername

But it's returning "index.php" instead of "membername" as the id.

Any ideas? I really need some help with this!

Thanks!
Jon Marus
try this. I think you need to escape the period in index.php:
RewriteRule ^gpbsd/member/(.*) gpbsd/member/index\.php?id=$1
     
jon31  (op)
Junior Member
Join Date: May 2003
Status: Offline
Reply With Quote
Mar 1, 2004, 04:24 PM
 
Ok, I will try both of these when I get a chance. I hope one of them works.

jon
www.jmarus.com - kicks by JM
     
jon31  (op)
Junior Member
Join Date: May 2003
Status: Offline
Reply With Quote
Mar 1, 2004, 05:54 PM
 
Ok, seems neither of those worked, but the issue was I was using similar paths. So I changed one from member to microsite, and it worked fine.

RewriteEngine on
RewriteRule ^gpbsd/microsite/(.*) gpbsd/member/index.php?member_id=$1
www.jmarus.com - kicks by JM
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Mar 1, 2004, 06:47 PM
 
well, when you think about it, what's happening is that it's going into an infinate loop, the request for index.php, also gets picked up...

eventually the thing realizes it's in a loop and dumps you with index.php, you should be able to fix it by adding "[L]" after it, which tells mod_rewrite that this is the last rule, and no other rules should be applied after it.

--will
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:58 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2