Swift Posted March 14, 2008 Posted March 14, 2008 I'm setting up a subdomain for private use. I've managed to stop robots (hopefully) but have a question about the URL and the way it shows up in browsers. I've set up a test subdomain called - believe it or not - test. If I access that subdomain as test.swiftbooks.co.uk the URL in the browser is showing up as www.swiftbooks.co.uk/test I'd prefer it to show up as test.swiftbooks.co.uk How do I achieve that? Or am I just being too pedantic? Quote
stevesh Posted March 14, 2008 Posted March 14, 2008 Or am I just being too pedantic? Probably, but it looks like it'll work the way you want it to if you set the subdomain up in CPanel. Don't create the folder first - let CPanel do it. Quote
TCH-Dick Posted March 14, 2008 Posted March 14, 2008 Most likely you have a redirect/rewrite rule somewhere that is causing this problem. Disable your .htaccess file and the problem should go away. Once verified, then you can sort out what in your .htaccess is causing the problem. Quote
Swift Posted March 14, 2008 Author Posted March 14, 2008 Probably, but it looks like it'll work the way you want it to if you set the subdomain up in CPanel. Don't create the folder first - let CPanel do it. I did that in the real subdomain, but when I tried to install the system it complained that the directory already existed - so I had to delete it. I guess I probably deleted the subdomain in cPanel as well. I've now renamed my subdomain root, deleted and recreated the subdomain and copied the system from the renamed root into the root created by cPanel. It seems to work. Is it my imagination or is the new cPanel putting subdomain root directories in a different place compared to the previous version? Quote
TCH-Bruce Posted March 14, 2008 Posted March 14, 2008 The subdomain function will create the folder if it does not exist and is the proper way to create a subdomain. If you already have a folder created, rename it, create the subdomain in cPanel, delete the folder it creates and rename the original folder. No redirects necessary. Quote
Swift Posted March 14, 2008 Author Posted March 14, 2008 Many thanks - problem solved by renaming the folder containing the newly implemented system, letting cPanel do all the subdomain and root folder creation, then copying the newly implemented system into the root folder created by cPanel. I'm still convinced the new version of cPanel is creating the subdomain's root folder under /home/-username- whereas the previous version was defaulting to /home/-username-/public_html. However, as the subdomain is now working as I want it's not a problem. In fact, I prefer it as it causes less confusion about which folders belong to which systems! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.