View Full Version : basic html question
im using default.html so ppl can access my website as www.xyz.com
but if i want them to access a page as
what do i do? also is there somethin better to use than "default.html" for seo purposes?
01-13-2008, 07:13 AM
What are you trying to do???
To access your site by typing the url only you would name it index.html and place it in the root directory.
From that page you could link to info.html if you want.
What do you get default.html from?
im trying to stop a page at a url like www.xyz.com/folder like if you goto http://joshminnich.com/ and click portfolio it stops at joshminnich.com/portfolio..or if u click any of the other links.. when i do that on my site it hsows the files in the folder as if it is browsed in windows explorer :confused::confused:
01-13-2008, 08:56 AM
Oh, so basically you want to hide the folder content? When someone tries to view a directory alone (ex. www.xyz.com/folder), the server looks for a index file in that folder; if it finds it, that's what it shows, if not, if shows a list of the files/folders in that directory. Just make a file named index.html and upload it to the directory. If someone tries to access that directory alone, it'll go straight to index.html. Simple as that.
Ex: http://www.codingforums.com leads to http://www.codingforums.com/index.php
01-13-2008, 10:07 AM
u can either keep a blank index.html page on the folder so tht no one views the folder.. or in ur cpanel u can disable folder view... in case u wanna redirect ur a simple html redirect...
Here's the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>Your Page Title</title>
<meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>
Optional page text here.
<meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"> is the part that actually does the redirecting.
The number preceding the url (in this case zero) tells the browser the number of seconds to wait before redirecting to the new url.
You could set this to 5 and add some optional text to your page - something like:
"Please wait while we redirect you to our new site".
That's it! Just copy the code, save it (i.e. save as index.html) and your html redirect will work perfectly.
01-13-2008, 08:39 PM
Now you may ask why the redirect works?
Basically when a website is created there are a few pages that are automatically defined at the root/home/base level of the website as root pages... The root pages, or documents, are defined to the webserver as pages to look for when a website loads... By definition these webpages can be anything the administrator desires but a few standards have been implemented. The standards are index, default and iisstart [if dealing with a Microsoft IIS Server].
If the webserver does not find these pages then the webserver displays the contents of the folder based upon the security rights of the internet user... The rights of the internet user are usually bound to an authenticated user on the server usually defined as an anonymous account... In most cases the anonymous account is given read only access to all folders available for a particular website...
01-13-2008, 10:48 PM
It's possible to change it from index, though (and even change which file extension gets priority.)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.