Forum Moderators: phranque

Message Too Old, No Replies

My site cannot be found when typing "mysite.com", can be found

It is found when typing "mysite.com/index.php

         

bartainer

5:00 pm on Jun 11, 2005 (gmt 0)

10+ Year Member



Hello;

Dumb question for my non-working brain today! I'm using DW to create a site. Call it "mysite.com"! Now, I have uploaded the files correctly, and I can see them all via ftp! However; when typing in the address bar "mysite.com" an ftp error page is looking at me! Now, I can type is "mysite.com/index.php" and there it is? Please help me!

encyclo

5:14 pm on Jun 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your directory index is not set to recognize index.php as the index file - probably it is looking for index.html instead.

If you are on an Apache server, create a .htaccess file (or append the following to your existing .htaccess):

DirectoryIndex index.php index.html index.htm

If you are on a Windows server, talk to your hosting company - they should be able to fix this quickly.

bartainer

5:19 pm on Jun 11, 2005 (gmt 0)

10+ Year Member



Right-on!

I duplicated all the code in index.php and pasted to the new page index.html. Uploaded the files and there it was! Now, this will not harm the rest? I can keep this html file?

bomburmusicmallet

5:29 pm on Jun 13, 2005 (gmt 0)

10+ Year Member



I find .htaccess files a pain to work with, and copying php code into an htm file won't work if you are actually using php!

Instead, here's what I. Create an index.htm file with this content:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Endicott College</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://www.endicott.edu/servlet/RetrievePage?site=endicott&page=Home">
</head>
<body>
</body>
</html>

HTH, Jenny

bomburmusicmallet

5:34 pm on Jun 13, 2005 (gmt 0)

10+ Year Member



oops, hit submit instead of preview, and had more to add.

Obviously change the URL to be the actual php page. You can use a relative link like this too:


<META HTTP-EQUIV="Refresh" CONTENT="0;URL=index.php">

The "CONTENT="0 part refers to 0 seconds. If you wanted to put a message to users like "this website has moved, if you are not redirected in so many seconds click here..." you can set this to 10 or 15 seconds and put content on your page.

One caveat is that this redirect makes it difficult for users to use their browser's back button. So if you are providing this link somewhere where it is necessary for a "one-click return" (I'm thinking of maybe a google ad or something like that) then supply the actual link instead of the redirect.

HTH, Jenny