I have setup the redirection plugin and have it working great, but I’m running into a problem in a special instance.
I have a page called /horse-ad/ that has a special template assigned to it. It pulls from another database some horse details based on the horse that is requested.
Currently to get to one of these pages you would use the url: /american-quarter-horse-for-sale-in-california/tap-dancin-playboy for example. I have the redirect working to send it to /horse-ad/ using a pass-through. This way I can preserve that longer URL that is descriptive about the ad, however, my REQUEST_URI variable is now just showing /horse-ad/ instead of the long version.
I need to be able to get access to the last part of that URL as it is the horses name (“tap-dancin-playboy”). Without it, I can’t look it up in the database.
Here is the Redirection REGEX I am using. Any help with me figuring out how to fix this would be greatly appreciated. I feel like I’m close, just missing something.
Source URL: ^(.*)for-sale-in(.*)\/(.*)$
I tried using $1 at the end and $2 but that didn’t seem to produce anything.
- The topic ‘Redirectring and preserving REQUEST_URI variable’ is closed to new replies.