Forum Moderators: coopster & phranque

Message Too Old, No Replies

varialbes in path names how to preserve in rewritten url?

         

jeremy goodrich

7:09 pm on Dec 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Okay, I finally got things working today :)

However, now when I have my handy dandy search engine friendly urls in the location bar, the script tells me it can't get the data from the database :( since the variable isn't passed the way the script expects, the script is having a hard time reading it.

is there any 'quick and dirty' solution to this, or do I have to rework the script, so that it unwrites the url, and can put values to the variables.

example : viewstuff.php?stuff=2&3

now looks like view/stuff/2/3

and then I get an error "can't find stuff in db" because the script doesn't know that stuff=2 anymore. Thanks!

john316

8:02 pm on Dec 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Jeremy:

I have been following your "struggle" to get the mod_rewrite working and was wondering if you could show what you have so far, I saw your earlier posts in another thread and am hoping to learn something from this.

It is a tricky piece of work.

Thanks,

John

gethan

11:19 pm on Dec 11, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Jeremy,

> Okay, I finally got things working today
Cool :)

> can't get the data from the database
Doh!

In the example I put up earlier the values are passed in as variables ... this should be seemless.

www.ewonder.co.uk/viewstuff/test/12/10

Shows the values as test = 12.

So something else is complicating things. Could you post your .htaccess? (modified to protect the innocent of course).

If you sticky me the urls for live things I'll also have a look.