Which page is the starting one

Hi,

  1. I’m not sure if the following HTML file is the starting one to call the site
  2. when I double click this, it then prompt me to download the file - ‘index.php’. Any advice?

<HTML>
<HEAD>
<META HTTP-EQUIV=“Expires” CONTENT=“Tue, 04 Dec 1993 21:29:02 GMT”>
<META HTTP-EQUIV=“refresh” CONTENT=“0; URL=index.php”>
</HEAD>
</HTML>

<META HTTP-EQUIV=“refresh” CONTENT=“0; URL=index.php”>

this one will redirect you to index.php so if you are running the page locally then it will download the index.php. But if you run it on a webserver it will serve you index.php

Many thanks. How can I know which file is for starting the site? How can I try to start the site from that folder?

an index file like index.php or index.asp or index.html

should I just double click the index.html/index.php to start the site? How can I escape if it prompts to download index.php after I’ve double clicked index.html?

IF this :

<HTML>
<HEAD>
<META HTTP-EQUIV=“Expires” CONTENT=“Tue, 04 Dec 1993 21:29:02 GMT”>
<META HTTP-EQUIV=“refresh” CONTENT=“0; URL=index.php”>
</HEAD>
</HTML>

is in your index file then remove
<META HTTP-EQUIV=“refresh” CONTENT=“0; URL=index.php”>

If it isn’t then I don’t see why you are having any problems.

hello I’m assuming you are running the site in your local computer and calling it inside a windows/mac folder…is that right? If that is the case then I’m afraid it won’t work as .php is a sever side file. you need to run it on a localhost or on a live server.

If I remove it, how can it call index.php?

Normally the Web Servers like Apache, IIS, etc. serve you the web pages and they have defined somewhere which file to show at first. So check in your web server, if it is PHP website and Apache is the web server then index.php or index.html should be the default pages to be loaded.

As an example to what rajug said:

This is a folder in my site that doesn’t have an index file http://www.i-mediaconcepts.net/kierulf/ It display the files inside the folder because there is no index file

This folder has an index file http://www.i-mediaconcepts.net/mash/ it runs the index.html inside the /mash folder

Cheers

Many many thanks to all. Which version of Apaches should we use for WinXP for testing that? If we have set up Apaches on one machine, is it true that we can call the site within any folders? I am asking for instance if we can have several versions on one machine for testing the program.

I use xammp easy to install just extract it to c:// delete everything on the htdocs folder and copy paste your files there start xammp and go to http://localhost

http://www.apachefriends.org/en/xampp-windows.html
goodluck

uhmm for multiple site create folders inside the htdocs folder example for a folder named “Site1” you can access it by going to http://localhost/Site1

Great appreciations for your nice help! By the way, which is a very good forum for MySql? The following one does not have many feedbacks!
http://forums.mysql.com/

Better to just create virtual hosts. You can add them in xampp\apache\conf\extra\httpd-vhosts.conf


# test.loc
<VirtualHost test.loc:80>
DocumentRoot E:\\xampp\\htdocs\\pathto\	est
ServerName text.loc
ServerAdmin admin@test.loc
</VirtualHost>

You’ll have to edit the windows hosts file as well (location varies I think)

127.0.0.1       localhost
127.0.0.1       test.loc

Many thanks to all!
After I’ve extracted ‘Xammp’ to one folder, I then run this batch - ‘apache_start’. But finally I’ve got this

Now we start Apache
Starting “apache”…
“apache” is not started.

Did you run the setup batch file first? I think it runs fine from a root (c:\xampp or d:\xampp etc), but needs to set itself up if anywhere else.

After I’ve set up XAMPP, do I need to restart WinXP (the machine)?

Are these steps correct for starting the site?

  1. after I’ve setup XAMPP to d: root, I put the following item to ‘D:\xampp\apache\conf\extra\httpd-vhosts’

<VirtualHost test.loc:80>
DocumentRoot d:\dev2\my_proc\admin
ServerName text.loc
ServerAdmin admin@test.loc
</VirtualHost>

  1. all of the files of the site are located at d:\dev2\my_proc

  2. I now double click this (but nothing is special)
    D:\dev2\html\admin\index.html

I want to know the correct way to start the site!

Since you are just learning now (so i will say you as a beginner), do nothing, but

  • just install XAMPP
  • open the XAMPP control panel
  • start Apache, MySQL (and others if you really need them).

Then create a folder ‘mysite’ inside XAMPP’s htdocs folder (which i assume you have already found it inside XAMPP installation folder) and put all the files in it. If your site uses the database then you need to import/create database in mysql from phpmyadmin (to manipulate databases you have phpmyadmin too with XAMPP so browse http://localhost/phpmyadmin). Now browse your site in your favorite browser as http://localhost/mysite/.

This is enough.