Welcome, Guest
Username: Password: Remember me
Got a Joomla problem? Post as much detail about it as you can here to see if you can get a solution.

Help others in the community - post your Joomla tips and how-tos here.

TOPIC: Subdomains verses subfolders

Subdomains verses subfolders 6 years 8 months ago #6254

  • jennymac
  • jennymac's Avatar
  • Offline
  • Senior Boarder
  • Posts: 74
  • Thank you received: 2
I have taken over management of a website that is Joomla 1.0!!!! Forget the migration, I am just building it in 2.5.4 from scratch.
On my Cpanel I created a sub-domain with database and user because I thought that would be useful as a development site. However, (I'm a bit unclear on the technical/correct terms at this point, sorry) it would appear that Cpanel created a sub-folder (into which I installed 2.5.4) and my development website is a sub-folder of the main domain instead of a sub-domain.
So:
1) does it matter?
2) If it does, to where so I move the folder so that it becomes a sub-domain instead of a sub-folder? Should it be part of the 'home' folder instead of the public_html folder?
3) If I move it, will the URL them be www.new.mysite.org.au ? (This is what I thought I was creating)
4) If #2 2nd question is correct, how do you get the Cpanel to put the folder there instead of in the public_html folder? Or do you let it be created then move it before you install anything in to it? Or does it matter at all?

Look forward to hearing from all you Joomla whizzes! :)
Blessings
Jenny
Jenny McWilliam
The administrator has disabled public write access.

Re: Subdomains verses subfolders 6 years 8 months ago #6255

  • ywsolution
  • ywsolution's Avatar
  • Offline
  • Junior Boarder
  • Posts: 36
  • Thank you received: 11
Hi Jenny,

Keep it as is - develop in the folder (ie yoursite.com.au/development/) and when you are ready move all the old site to a sub folder and move your new site into the main directory. Cpanel makes doing ll this easy.

The references to the database remain unchanged

In developing your site remember to make all links relative.

Also tell robots not to look in the development folder.
The administrator has disabled public write access.

Re: Subdomains verses subfolders 6 years 8 months ago #6256

  • jennymac
  • jennymac's Avatar
  • Offline
  • Senior Boarder
  • Posts: 74
  • Thank you received: 2
Hi Ian,
thank you so much for the heads up.
2 things.
What so you mean by 'relative' and how do I tell the robots to keep away- is that through the robots.txt file? If so, are their special words to write in it?
Jenny McWilliam
The administrator has disabled public write access.

Re: Subdomains verses subfolders 6 years 8 months ago #6257

  • ywsolution
  • ywsolution's Avatar
  • Offline
  • Junior Boarder
  • Posts: 36
  • Thank you received: 11
Just add
Disallow: /foldername/ to your robots.txt file

www.joomla.org.au/forum/joomlaoz-help-an...elp/reply-to?id=6256

is absolute

/forum/joomlaoz-help-and-troubleshooting/re-slide-show-pro-line-9-require-help/reply-to?id=6256

is relative
The administrator has disabled public write access.

Re: Subdomains verses subfolders 6 years 8 months ago #6258

  • jennymac
  • jennymac's Avatar
  • Offline
  • Senior Boarder
  • Posts: 74
  • Thank you received: 2
Got it- thanks so much Ian.
Jenny McWilliam
The administrator has disabled public write access.

Re: Subdomains verses subfolders 6 years 8 months ago #6259

  • MaxTech
  • MaxTech's Avatar
  • Offline
  • Gold Boarder
  • Posts: 222
  • Thank you received: 23
Hi Jenny,

Just to clarify - through a basic cPanel account you can't add "real" sub-domains . . . as you only have one cPanel account and a "real" sub-domain is another account.

So . . . what cPanel does is create a virtual directory/symlink and updates the DNS so that "new.mysite.com.au" is just a redirect to the actual location, which is a sub-directory like mysite.com.au/new --- how this happens can sometimes depend on the cPanel setup, but it always just a redirect to the directory. if you have a WHM/Reseller/Dedicated server setup it sets up a whole new account for sub-domains . . . . which in your case you are probably better off it just created the directory for you to work in :)

The above points from Ian are correct.

Do not include the "new" directory name in your links. Update the config and htaccess files and put the "new" directory as the directory of the Joomla install during dev. This will make the links relative back to the "new" folder being the base directory.

When you go live and have the new site in the base directory remove the "new" settings from the config and htaccess files and then all links will now go the html root folder as your base directory (as you want it to do).

Feel free to ask for any extra pointers during dev or before going live.

Max
Founder & CEO @ molehill.com.au & successeng.in
Partner @ joostrap.com - Joomla! Website Templates & Responsive Web Design
The administrator has disabled public write access.

Re: Subdomains verses subfolders 6 years 8 months ago #6274

  • normdouglas
  • normdouglas's Avatar
  • Offline
  • Senior Boarder
  • Posts: 45
  • Thank you received: 5
And... bravo on NOT trying to migrate.

What you have done is actually a very common dev/testing phase technique.

Good luck
Rules for Website development:
Step 1: Backup
Step 2: Refer step 1
The administrator has disabled public write access.

Re: Subdomains verses subfolders 6 years 8 months ago #6326

  • Jennifer
  • Jennifer's Avatar
  • Offline
  • Junior Boarder
  • Posts: 38
  • Thank you received: 7
I recently came across this article and although it is more technical than Jenny probably wants, I'll add it here anyway as its on topic and might be of interest to others reading it:

www.ijoomla.com/blog/organize-your-public_html-directory/

Cheers,
Jen
The administrator has disabled public write access.
Time to create page: 0.154 seconds
Powered by Kunena Forum