Redirect help

Hello I am doing a complete rebranding and changing domain names for my site and need to setup a redirect for our old links in case someone clicks it. Here is what Im looking to do, some pages have dynamic urls others are just static pages:

www.purple.com/page.php?id=123 to redirect to www.orange.com/page.php?id=123
www.purple.com/promo.php to redirect to www.orange.com/promo.php

It would help us if you can tell us what kind of http server you have serving the requests. If you are using apache you can use mod_rewrite and re-direct or you can use a programming language to redirect based on the domain.

But what your are after is a 301 redirect

This will redirect all users from your old domain to your new one. This is not tested at all by me i just wrote it from memory on here so yeah. But there is tons of tutorials on mod_rewrite and 301 redirects that it should be easy to figure it out.

Apache mod_rewrite .htaccess

Options +FollowSymLinks
RewriteEngine on
RedirectMatch 301 ^http://www.purple.com/page.php?id=123  http://www.orange.com/page.php?id=123
1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.