Where is error??

windows

Guest
The web server contain 3 files(this is an example): <br />
1) folder "cgi", placed in server by default ( I not use it) <br />
2)folder "folder"(I put file.pdf in this folder) <br />
3)index.php -page that contain the php code. <br />
<br />
When I try open <!-- m --><a class="postlink" href="http://domain.com">http://domain.com</a><!-- m -->, I get message: ERROR 404 PAGE NOT FOUND <br />
The <!-- m --><a class="postlink" href="http://domain.com/folder/">http://domain.com/folder/</a><!-- m --> opens normally, but <!-- m --><a class="postlink" href="http://domain.com/folder/file.pdf">http://domain.com/folder/file.pdf</a><!-- m --> - gives error:ERROR 404 PAGE NOT FOUND <br />
What is wrong? How do need place file correct?<!--content-->Originally posted by Taurus <br />
The web server contain 3 files(this is an example): <br />
1) folder "cgi", placed in server by default ( I not use it) <br />
2)folder "folder"(I put file.pdf in this folder) <br />
3)index.php -page that contain the php code. <br />
<br />
When I try open <!-- m --><a class="postlink" href="http://domain.com">http://domain.com</a><!-- m -->, I get message: ERROR 404 PAGE NOT FOUND <br />
The <!-- m --><a class="postlink" href="http://domain.com/folder/">http://domain.com/folder/</a><!-- m --> opens normally, but <!-- m --><a class="postlink" href="http://domain.com/folder/file.pdf">http://domain.com/folder/file.pdf</a><!-- m --> - gives error:ERROR 404 PAGE NOT FOUND <br />
What is wrong? How do need place file correct? <br />
Look at your code very carefully, you could have an error.<!--content-->HTTP error 404 means the server could not find the page the browser requested. Here, it is probably occuring because your server is not set to use index.php as the default page when none is specified (i.e. the user enters <!-- m --><a class="postlink" href="http://domain.com">http://domain.com</a><!-- m -->).<br />
<br />
You need to change your server setup to treat index.php as a default document - see your server documentation for instructions on how to do this. Alternatively, most servers use names like index.htm, index.html or default.htm for the default document, so try making your index page one of these extensions instead.<br />
<br />
Adam<!--content-->I use third party hosting. As I see from rules, the first page may be named as index.php:<br />
"Your first page must be called one of the following: index.html... index.php, INDEX.PHP"<br />
<br />
I use the following code(example), which I put in html page on the top(I delete ALL default content from html window in FrontPage2000 new page and place my code):<br />
<br />
<?php <br />
$file_url = "http://subdomain.com/folder/file.pdf"; <br />
header("Content-Type: application/pdf"); <br />
header("Content-Disposition: inline; filename="file.pdf""); <br />
header("Location: $file_url"); <br />
?><br />
<br />
Now when I type url <!-- m --><a class="postlink" href="http://subdomain.com">http://subdomain.com</a><!-- m --> I just see empty page(with no error message). When I type <!-- m --><a class="postlink" href="http://subdomain.com/folder/file.pdf">http://subdomain.com/folder/file.pdf</a><!-- m --> the file opens normal.<br />
<br />
Taurus<!--content-->
 
Back
Top