PDA

View Full Version : Redirect page help


pauldf
07-15-2011, 11:22 AM
How's things guys

I am after buying a new domain name that is a slight variation of my main website and what I want to set up is a redirect link from this new domain to my main site. So that when someone types in the new domain name they are automatically directed to the main website. I was looking at using php to set up my redirect:

<?php
header("location: http://mymainsite.com");
?>

Just 2 questions is there any need to add in the 301 code to this (security issues etc.)
And since this is php is there any way I can add keywords and a content description to this page so that if someone does a google search and use my new domain name it will come up in google search with the new domain name listed and description but once they click on it they will be brought to my main website. Basically it is almost the same domain name but instead of ending in .ie it ends in .com.

Or should I be looking at something different then php?

This is probably a simple question to most of you guys and I would be really thankful for any help or information you can give.

All the best.

Corrosive
07-15-2011, 12:28 PM
Don't use PHP. '301' it using .htaccess.

pauldf
07-17-2011, 10:48 PM
Cheers Corrosive for your reply. I'll take you advice. Thanks for posting :)