Jump to content

Redirect based on query param values


Arlington

Recommended Posts

I know how to take simple query params and do redirects as long as the URL is in the format of "http://<domain>/<page>.php?<param>=<value>".  I just take the value and do a "header ( 'Location..." and redirect.

 

I saw a really neat redirection done on an ASP.net site ("http://grapestories.com/w?854619" redirects to "http://www.grapestories.com/wine.asp?iWine=854619") and would love to do the same in PHP....  is there a way? Without specifying a page name, and a query param name, so I can keep the URL short.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/219211-redirect-based-on-query-param-values/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.