PDA

View Full Version : Help needed: How to link subdomain to page?



stephiesays
04-23-2009, 11:28 PM
I want to link a wordpress page to a subdomain.

This is what I have done: I created a page:
http://www.stephiesays.com/street/

I want to have this URL address for the above page:
street.stephiesays.com

Every time I create a redirect from the 'Subdomain' section of Bluehost.com's cPanel, I will get an error message.

Question 1: How do I ensure a smooth redirect?

Question 2: How do I ensure that the URL reflected in the URL bar reads 'street.stephiesays.com' instead of 'http://www.stephiesays.com/street/"?

Your answers and advice will be very much appreciated. Thanks in advance!

felgall
04-24-2009, 12:26 AM
Just create the sub-domain on that directory. A redirect is not required since when you create the sub-domain it will already point there.

cetacea
05-11-2009, 11:15 PM
Hi Stephie,

I don't know if you managed to solve your problem, but I'm running into the same situation. I can create any subdomain names I want to, but only those with four letters or fewer will actually redirect correctly.

Try creating a subdomain with four letters like stre.yourdomain.com and have it directed to "http://yourdomain.com/street ".

If it works, then the problem is with Bluehost. Submit a ticket and see what they say.

felgall
05-12-2009, 03:06 AM
You don't have to redirect a subdomain to an existing folder on your site - the subdomain automatically points to a folder when you set it up.

Redirects are only useful for when you want a subdomain to point to something not on your actual hosting or something that is on your hosting but you didn't define yourself such as redirecting the mail subdomain to the webmail folder to give yourself a subdomain for accessing mail.

All you need to do to attach a subdomain to a web page is to create the subdomain specifying the folder it is to use as its home, leave the redirect part blank, and upload the page as index.html (or index.php).

JamesYap
06-01-2009, 01:21 PM
I want to link a wordpress page to a subdomain.

This is what I have done: I created a page:
http://www.stephiesays.com/street/

I want to have this URL address for the above page:
street.stephiesays.com

Every time I create a redirect from the 'Subdomain' section of Bluehost.com's cPanel, I will get an error message.

Question 1: How do I ensure a smooth redirect?

Question 2: How do I ensure that the URL reflected in the URL bar reads 'street.stephiesays.com' instead of 'http://www.stephiesays.com/street/"?

Your answers and advice will be very much appreciated. Thanks in advance!

1. Create the subdomain in BlueHost CPanel street.stephiesays.com without requesting a redirect.
2. Create a file in NotePad and put the following into it and save it as index.php

<?php
echo file_get_contents('http://www.stephiesays.com/street/');
?>
3. Upload it into subfolder "street" in your home directory

This is not a fool proof solution, expected problem would be broken links and broken images. Solution is to use ABSOLUTE path to your links and images.