Mod Rewrite with get variable

Hi there,

How do i mod rewrite so that i have a page with a get variable is passed to parameter.

I want page.php?id=67/images
to go to images.php?pageId=67

Thanks!

That’s not the usual format of mod rewrite.

You may have /images/67 go to images.php?pageId=67
And /page/67 go to page.php?id=67

But redirecting page.php?id=67/images to images.php?pageId=67 is just weird and confusing. Can you elaborate why you may want that URL instead of the above mentioned ones?

Vincentas,

You might benefit from reading the mod_rewrite tutorial linked in my signature as it contains explanations and sample code. It’s helped may members and should help you, too.

Regards,

DK

Thanks a lot!

Vincentas,

If you REALLY want to make the “unusual redirections” (as noted by cp), please use the tutorial to guide you to capture the relevant parts of the {QUERY_STRING} and redirect page.php to images.php with the desired query string (hint, hint, hint). If you can’t get it working right away, please post your code and I’ll guide you to the simple solution (meaning that I won’t code for script kiddies but I will help everyone learn how to use mod_rewrite).

Regards,

DK