Jesse 0 Report post Posted February 22, 2008 Ok, what I am trying to do is this. Re-direct a domain name called: avalon.asn.au to preschool.stmarksavalon.org.au I have created a script that will re-direct within the a folder. However, the avalon.asn.au and stmarksavalon.org.au are PARKED Domains. Any ideas on how to create this PHP Redirect Script please? Share this post Link to post Share on other sites
sonesay 7 Report post Posted February 22, 2008 (edited) I think this code will do it <?phpheader("location: newlocationname.php");?> Edited February 22, 2008 by sonesay (see edit history) Share this post Link to post Share on other sites
Jesse 0 Report post Posted February 22, 2008 (edited) Yeah that is the PHP Script I already have. But the issue is it needs to go from one parked domain to another sub-domain on another parked domain and the avalon.asn.au does NOT have its own folder to insert the current PHP Script that I have.The actual working code I have is: <?$URL="http://preschool.avalon.anglican.asn.au";header ("Location: $URL");?> However there needs to be the link in thee from avalon.asn.au to re-direct to the link in the code above. Edited February 22, 2008 by Jesse (see edit history) Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted February 22, 2008 Change the Nameservers on the Domain you need to be re-directed to the other Parked Domain. Share this post Link to post Share on other sites
Jesse 0 Report post Posted February 22, 2008 Name Servers are Re-Directed. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted February 22, 2008 Wait a minute... the avalon.asn.au is a Subdomain, so the nameservers can't be changed.Could you create a folder for avalon.asn.au and add the index file with the redirect to that folder??? Creating the subdomain creates a folder for the subdomain, does it not? It does in Cpanel. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted February 22, 2008 Or un-park that Domain and create an Add-on Domain at the second location. Share this post Link to post Share on other sites
Jesse 0 Report post Posted February 22, 2008 No the avalon.asn.au is not the sub-domain (it is a parked domain) the sub-domain is preschool.stmarksavalon.org.au Share this post Link to post Share on other sites
Jesse 0 Report post Posted February 22, 2008 That can't be done. The web host is the Anglican Church, the Minister I know is wanting me to help him with this but because of the limited access in the cPanel and so on, its making it hard and having to write a full php re-direction instead of just the simple re-direction which I already had made. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted February 22, 2008 You'll need to modify the Index page of the receiving Domain to write the redierct for you.Need the php script for that? I have a similar script handy. Share this post Link to post Share on other sites
Jesse 0 Report post Posted February 22, 2008 Yes that would be great if you do Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted February 22, 2008 Try this: <?phpif ($_SERVER[HTTP_HOST] == 'avalon.asn.au') { // avalon.asn.au header('Location: http://preschool.stmarksavalon.org.au');}?> *EDIT*I guess it didn't work, so I suggest you ask the nice Minister to allow you to add-on the Domain to the right place. That would be the best solution (overall). Might not be the simplest, but Google and the Bots might not like the double re-direct, first to the Parked Domain and then to the sub-domain. It would be best to get better SEO and to shorten the download time, etc. Share this post Link to post Share on other sites
Jesse 0 Report post Posted March 8, 2008 I just ended up telling him to spend the extra few dollars a month and host the pre-school on a seperate account. Which after a LOT of talking he finally agreed. Some people just have no idea what they are asking of people, it is so annoying at times. Share this post Link to post Share on other sites