We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Website design question
gizmoleeds
Posts: 2,232 Forumite
in Techie Stuff
I am designing a website.
I want to have pages so that people can type:
www.domain.com/news
www.domain.com/contacts
etc.
Do I therefore want to save the pages as "news.html" and "contacts.html" or have like a folder called "news" with "index.html" in it?
Thanks in advance
I want to have pages so that people can type:
www.domain.com/news
www.domain.com/contacts
etc.
Do I therefore want to save the pages as "news.html" and "contacts.html" or have like a folder called "news" with "index.html" in it?
Thanks in advance
0
Comments
-
What you want to do is create a page called index.html and then on that page create links that point to the "news" and "contacts" pages. By default index.html is the start page for all the websites. This can be configured to be different if required. Hope this helps.0
-
Just call them all whatever links.htm/l news.htm/l and the browser does the rest
So I can go to your homepage called xxxx.com but the browser will find the hmt/l part0 -
gizmoleeds wrote:
Yes.
Depending on your server technology you can use things called rewrite rules so that
gizomleeds/news can be served from gizmoleeds/news.php without the user being aware.
For a basic website just create directories and put in an index.html file.0 -
gizmoleeds wrote:I know that the main page is index.html.
What I mean is if I say to someone just type "www.domain.com/news" then do I want to be saving that page as news.html or index.html in a news folder?
How does the BBC get this?:
http://www.bbc.co.uk/bbcone
Is that an "index.html" page in a directory called "bbcone"?
In IIS, you can set a default page which applies to all subdirectories as well. So if the default page is specified as index.html, if you type https://www.domain.com/news then it will look for an index.html file in the subdirectory of news.0 -
The latter.gizmoleeds wrote:I am designing a website.
I want to have pages so that people can type:
https://www.domain.com/news
https://www.domain.com/contacts
etc.
Do I therefore want to save the pages as "news.html" and "contacts.html" or have like a folder called "news" with "index.html" in it?
Web servers (Apache, IIS etc.) default to index.htm or index.html or similar when the page isn't specified in the URL. So if someone types https://www.domain.com/news the web server will respond with https://www.domain.com/news/index.htm and therefore you need a folder called news with index.htm or index.html in it.0 -
As has been said above, it's better to have an index.html in every directory - even if you have decided go the other way it might be a good idea to have a blank index.html page
Ever see a page like this when browsing the internet? - either by following a broken link, or manipulaing a url to try to get up a level
If your browser can't find the page it's looking for, it looks for an index.html. If it can't find that then it builds a list of everything in the folder (if it's allowed to) and that means people can explore all the pages in your directory - even the one's that might not be ready yet - and they can get direct to pages rather than following the route you want them to.
When index.html is available in a directory that doesn't happen0 -
It's always best to use an index.html page for the reasons previously mentioned. However, on most popular web servers (Apache, IIS etc.) you can also specify the "default document" (terminology in IIS) which the web server will look for when you open a specific directory.
So, http://www.gizmoleeds.com/gizmoleeds could go to somepage.php, text.asp or the default, index.htm or index.html. Almost all web servers default to index.html, index.htm and all the other extensions like .php, .asp with index in front of them so just call it index.html or index. then your page extension and you should be OK.
I hope that makes sense.
0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 352.1K Banking & Borrowing
- 253.6K Reduce Debt & Boost Income
- 454.3K Spending & Discounts
- 245.2K Work, Benefits & Business
- 600.8K Mortgages, Homes & Bills
- 177.5K Life & Family
- 259K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards
