How do I create a domain/subdomain that points to a folder on an existing Cloud Site?
NOTE: This article is written for our Classic Cloud Control Panel. You can access this interface from the New Cloud Control Panel by clicking your username in the upper-right of the control panel and selecting "Classic Cloud Control Panel".
Currently, the Classic Cloud Control Panel does not provide the ability to create an alias that points to a folder other than the website's web root. To accomplish this, you will need to use a redirect script, which can be accomplished by following these steps:
- Log in to your Classic Cloud Control Panel at http://manage.rackspacecloud.com
- Create the domain or subdomain
- Once the domain or subdomain is set up in your account, you will need to add a PHP redirect to the web content folder using FTP. See How do I add content to my website?
- Create the following PHP redirect on your computer in a text editing program:
<?php header("Location: <Insert_URL_Here>"); ?>
After the Location: directive, enter the URL that you want to redirect the website to (for instance, http://www.example.com/subdirectory). Using this example link the full script would look like this:
<?php header("Location: http://www.example.com/subdirectory"); ?>
Save this file as index.php.
- Login to your FTP client
- Select the website from the list of websites associated with your username and password
- Select the web folder
- Select the content folder
- Copy index.php from your computer to the content folder
© 2014 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License
See license specifics and DISCLAIMER