-
Exactly as @NoHarleys described, one must be aware of the difference between 'server root' and 'site root'. Some hosting plans give you both, the site root being one level up the tree from the server root. In this case, one would likely see all manner of folders in the server root, such as 'cgi-bin', 'mail', 'private', and so on, including one of, 'public_html', 'html', 'www', 'htdocs', 'public', or some similar folder.
In your FTP client, be sure to specify the initial folder as the SITE ROOT, if it is different from the server root; i.e., example.com/public_html/. Try connecting (via FTP) to just the domain. Generally, when you log in for the first time, if you see any folders, you know your site root is one of them. If there are none, then you are on your site root. If the site root folder exists, then point your client to it (usually in a separate tab, 'initial folder').
If you are working with common gateway interface scripts, then you might want to set up two sites, one with just the server root, so you can have access to these scripts and files (such as formmail), and one that points at the site root for day to day maintenance. Your local copy of the server root would only mirror the server-level folders, and not the complete site. The mirror copy of your web would be in the other local site. (If that makes any sense...)
Before you log in to your FTP, bring up your domain in a browser. Often a hosting company will populate the home page with boilerplate copy promoting their own services until such time as you install your own home page. Make note of the names of the files, so you will recognize them when you do log in with FTP. They'll be the ones you can discard, once your own page is in place. Just rename them, for the time. You don't need to delete them right away. The only one that will interfere will be the one named 'index' [.html | .htm | .php | .shtml | .asp | .. ], namely the default index page that comes up with just 'yourdomain.com/' typed into the location bar.
A person could play around and see how your server prioritizes web mime extensions. Generally, index.html will trump all others, but you would need to create a number of files, all called index, but each with their own extension. You will need to add some text to each file, identifying its extension. Call the site and see which file is downloading. Note it, and delete it from the server. Refresh and see which comes up next. Repeat through all the extensions you will be using, and you will have your hierarchy.
Now you know how to trump your own pages--just adopt an extension for everyday use that is second or third from the top. Just never use "index.[ext]" in your internal or inbound links. That is, always structure your URL's as "/folder/subfolder/" which will return the highest priority index page available, or a 403 (forbidden) if there is none. This will keep search engines from indexing the full URI of your index pages, and allow you to trump the odd page on occasion, if the need arises. Swap in a temporary page with a higher priority, work on the other one, and remove the temporary page when complete. Easy like pie, and nobody will ever be the wiser.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules