Adding a page to a website


#1

Hi, In my other host server, there was a folder called ‘httpdocs’. this is where you put all your content. so if i wanted to create a new page like www.domain.com/newpage
i would create a folder called ‘newpage’ under the ‘httpdocs’ folder.

my question is, how do i do that here? I dont see any folder like that. What can i do?


#2

You don’t need one. When you look at your site via ftp, you will see a folder that has the same name as your domain name. All files inside that folder are visible from the web.

If you want to you can create new folders inside of that folder but they are not required.

Therefore if your domain was called example.com and you placed a web page inside of the folder called example.com called nextpage.html, your url would be http://www.example.com/nextpage.html

Now if you do not want someone to have to type in the page for example: http://www.example.com
Just create a webpage that starts with the name index and use one of the allowed extensions such as htm, html, php and so on.
If you create a folder called folder and used the index file. then the url would be http://www.example.com/folder or they could type http://www.example.com/folder/index.html if your index uses the html extension.

I hope this all makes sense. Any more questions feel free to ask. There are a lot of very friendly people that are willing to help you.

My website


#3

It sortof makes sense. The ‘index’ part confuses me. where do i get this index file?

i want the address of my new page to be www.domain.com/newpage

That way every page has there own folder under the main domain.


#4

Here is some documentation that will explain technical details.

http://httpd.apache.org/docs/2.0/mod/mod_dir.html

Since a directory is a list of files and subdirectories, an index page is meant to show this list when browsing to a directory. It doesn’t have to though and you need to follow the link to learn how.

[quote]i want the address of my new page to be www.domain.com/newpage

That way every page has there own folder under the main domain. [/quote]
By default the web server will redirect a URL like http://www.domain.com/newpage to http://www.domain.com/newpage/ assuming you have a directory at /home/user/domain.com/newpage/

So you could just link to http://www.domain.com/newpage/ and create an HTML document at /home/user/domain.com/newpage/index.html and be done with it.

The trailing slash is necessary as you are linking to a directory (“folder”) instead of a file.
:cool: openvein.org -//-


#5

that link didnt work


#6

Fixed. http://httpd.apache.org/docs/2.0/mod/mod_dir.html

:cool: openvein.org -//-