I just migrated a site that was written quite a while ago to wordpress.
Doing this caused the url structure to be different now using mod-rewrite. I realized after I put the new site live that there are emails that have been sent out for customers to redeem their gift certificates from the site using the old URL.
My question is, with htaccess is there a url redirect that I can do and keep the get information with it. For example, I would need this url:
www.test.com/redeem.php?id=123
to redirect to:
www.test.com/redeem/now/?id=123
If there’s no solution with .htaccess, does anyone have any solution for PHP?
Here’s what my htaccess file looks like now:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Thanks for your help.
What I ended up doing was writing this code in the header file and it works.