How to redirect several domain names to a particular page on a website?

Hi,
I am trying to work out the best way to redirect several domain names to a particular page on a website?

I was thinking of just parking all domain names in cPanel under mywebsite.com.au and the setting up redirection using .htaccess?

If this would work how would I code the following redirects in .htaccess file?


www.my_domain_name.com.au 
redirect to
www.mywebsite.com.au/index.php?page_id=214

www.anotherwebsite.com.au 
redirect to
www.mywebsite.com.au/index.php?page_id=13

www.my_otherdomain_name.com.au 
redirect to
www.mywebsite.com.au/index.php?page_id=66


Thanks
sabecsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RedLondonCommented:
You can do it using cPanel without editing the .htaccess file yourself

Add www.my_domain_name.com.au, www.anotherwebsite.com.au and www.my_otherdomain_name.com.au to cPanel as ADD-ON domains, not PARKED domains

On the ADD-ON domains page you have the option of setting an FTP username and password - you have to fill that out, but you won't ever use the details you put in there so just satisfy it by giving it some gibberish.  The key part is the "home directory" for each domain... you don't want it to be the default of /public_html/my_domain_name.com.au - change it instead to /public_html_my_domain_name.com.au (you don't want it to be under the same folder as the main domain so that the next bit works)

Once you've completed the Add-On domain page, in cPanel click Redirections.  Use the pulldown to select each domain in turn, so starting with my_domain_name.com.au you just then tick the "Redirect with or without www." and then paste in http://www.mywebsite.com.au/index.php?page_id=214 and click Submit, then you're done.

If you don't use Addon domains and instead use Parked, cPanel would refuse to do the redirection becuase it would create a redirect loop - but it does work with Addon domains when you set a different folder for them, one that isn't inside public_html.  I've done it before and just tested it with a couple of domains just now.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.