script variable as URI?

Discuss practical ways rearrange URLs using mod_rewrite.

script variable as URI?

Postby kinmich1 » Mon Dec 09, 2002 8:42 pm

Ok,

this is very frustrating. I thought what I was doing would be quite common and easy, but I'm having a lot of trouble, and nothing I've tried has even remotely worked. So I'm still at square one.

I want to take a URL like:

http://www.domain.com/<IDENTIFIER>/path/to/some/file.php?var1=5&var2=blah

and WITHOUT REDIRECTING, have the server process:

http://www.domain.com/path/to/some/file.php?ID=<IDENTIFIER>&var1=5&var2=blah
(or /DocumentRoot/path/to/some/file.php?ID=<IDENTIFIER>&var1=5&var2=blah)

But, the server is looking for a file <IDENTIFIER> in the DocumentRoot and returning a 404. Of course <IDENTIFIER> will never exist, but path/to/some/file.php will always exist.

How can I do this?
kinmich1
 

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 74 guests

cron