Jump to content
xisto Community
Jesse

Php Rediret Script

Recommended Posts

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

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 by Jesse (see edit history)

Share this post


Link to post
Share on other sites

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

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.