Page 1 of 1

HTTP Server not working when trying to "portable" the path

Posted: Sat Sep 07, 2019 7:00 pm
by luckulucki
Hello,

I'm using the HTTP Server with a selfmade landingpage (Everything.html), which I try to configure to the same directory where Everything stays.
But in my Browser, I only get 404 Errors.

I try to use Everything PORTABLE, so I cannot give a full path, but only relative paths, like ./foo or ../foo

Ok, here is my Server.log:

Code: Select all

07.09.2019 20:26: 1556: 192.168.168.1: GET /
07.09.2019 20:26: 1556: 192.168.168.1: 404 Not Found
07.09.2019 20:26: 1560: 192.168.168.1: GET /
07.09.2019 20:26: 1560: 192.168.168.1: 404 Not Found
07.09.2019 20:27: 1556: 192.168.168.1: GET /
07.09.2019 20:27: 1556: 192.168.168.1: 404 Not Found
07.09.2019 20:27: 1560: 192.168.168.1: GET /
07.09.2019 20:27: 1560: 192.168.168.1: 404 Not Found
07.09.2019 20:28: 2160: 192.168.168.1: GET /
07.09.2019 20:28: 2160: 192.168.168.1: 200 OK
07.09.2019 20:28: 2160: 192.168.168.1: GET /main.css
07.09.2019 20:28: 2160: 192.168.168.1: 200 OK
07.09.2019 20:28: 2160: 192.168.168.1: GET /Everything.gif
07.09.2019 20:28: 2160: 192.168.168.1: 200 OK
07.09.2019 20:28: 2160: 192.168.168.1: GET /
07.09.2019 20:28: 2160: 192.168.168.1: 404 Not Found
07.09.2019 20:38: 1736: 192.168.168.1: GET /
07.09.2019 20:38: 1736: 192.168.168.1: 404 Not Found
07.09.2019 20:38: 2020: 192.168.168.1: GET /
07.09.2019 20:38: 2020: 192.168.168.1: 404 Not Found
At 07.09.2019 20:28: 2160 I tested with a full path, like C:\foo\bar\Everything.html

That worked, but before and after then, I tried

./Everything.html
.\Everything.html
..\Everything.html
.Everything.html

and non of them worked.

This is how I configured the Serverlog. That file is written in the correct and same directory as Everything.exe is.
So I don't understand, why I get the 404's .
Bildschirmfoto 2019-09-07 um 20.44.12.png
Bildschirmfoto 2019-09-07 um 20.44.12.png (96.09 KiB) Viewed 2542 times
The Filename Everything.html exists, I have copied the name to be sure to have no typo.

This is the Everything.html:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=512"><title>Everything</title>
<link rel="stylesheet" href="/main.css" type="text/css">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
</head>
<body><center>
<br>
<br>
<a href="/"><img class="logo" src="/Everything.gif" alt="Everything"></a>
<br>
<br>
<form id="searchform" action="/" method="get"><input class="searchbox" style="width:480px" id="search" name="search" type="text" title="Search Everything" value="" ></form>
I stole it from the original template and shortened, because I want to use the HTTP Sever with my iPhone and don't need all those drives and folders shown at the beginning (also, it takes too long to load such a huge page on my phone. I just need an empty page with a searchfield.)

This is the Explorer-View, just to show, how my Everything files look like:
Bildschirmfoto 2019-09-07 um 20.58.50.png
Bildschirmfoto 2019-09-07 um 20.58.50.png (94.58 KiB) Viewed 2542 times

I guess, there is something, I forgot about to set up? Mayby I have to edit the paths in the HTML Code?
I'm stuck here, need a little advice, please :-)

Thank you!

Re: HTTP Server not working when trying to "portable" the path

Posted: Sat Sep 07, 2019 9:25 pm
by NotNull
What happens if you configure it like this:

Code: Select all

Serve pages from=.
Default page=Everything.html
(Can't test it)

Re: HTTP Server not working when trying to "portable" the path

Posted: Wed Sep 11, 2019 10:52 pm
by luckulucki
That worked!
Wow, just a single dot and everything is repaired ;-) Thank you!

Re: HTTP Server not working when trying to "portable" the path

Posted: Thu Sep 12, 2019 7:39 pm
by NotNull
:thumbsup: :)