fixed 404
This commit is contained in:
parent
5a3f55920d
commit
cd3800ec5a
5
css/404.css
Normal file
5
css/404.css
Normal file
@ -0,0 +1,5 @@
|
||||
h1 {
|
||||
color: red;
|
||||
|
||||
|
||||
}
|
17
ezweb.py
17
ezweb.py
@ -1,4 +1,4 @@
|
||||
port = 8080
|
||||
port = 1111
|
||||
|
||||
import os
|
||||
import sys
|
||||
@ -147,8 +147,6 @@ class MyHandler(SimpleHTTPRequestHandler):
|
||||
|
||||
|
||||
|
||||
self.send_header('Content-type', 'text/html')
|
||||
self.end_headers()
|
||||
|
||||
# Merge all the files together procedrealy
|
||||
# todo: make compiler verson of this
|
||||
@ -175,19 +173,12 @@ class MyHandler(SimpleHTTPRequestHandler):
|
||||
|
||||
"""
|
||||
print(paths.replace("/",""))
|
||||
|
||||
|
||||
self.send_response(404)
|
||||
self.end_headers()
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', 'text/html')
|
||||
self.end_headers()
|
||||
|
||||
|
||||
|
||||
|
||||
content = ""
|
||||
self.wfile.write(content.encode())
|
||||
print(content)
|
||||
self.end_headers()
|
||||
|
||||
|
||||
# Set the server address and port
|
||||
server_address = ('', port)
|
||||
|
@ -1,3 +1,6 @@
|
||||
|
||||
<h1> uh oh </h1>
|
||||
<p>This is 404.html for when the page could not be found</p>
|
||||
<p>This is 404.html for when the page could not be found</p>
|
||||
<p>this is an error with finding the location of a file, its probly not easyweb (hopefully)</p>
|
||||
<br>
|
||||
<p>make sure the files are in the right place (html is in /html/ css in /css/ etc).</p>
|
Loading…
x
Reference in New Issue
Block a user