Add : 웹 버그 제거

This commit is contained in:
KINDNICK 2025-09-18 21:15:21 +09:00
parent ba08e352d4
commit b040949c46
2 changed files with 9 additions and 25 deletions

View File

@ -2,19 +2,19 @@
<nav class="navbar"> <nav class="navbar">
<div class="nav-container"> <div class="nav-container">
<div class="nav-logo"> <div class="nav-logo">
<a href="/"> <a href="/index.html">
<img src="/mingle-logo.webp" alt="밍글 스튜디오 - 인천 모션캡쳐 전문 스튜디오 로고"> <img src="/mingle-logo.webp" alt="밍글 스튜디오 - 인천 모션캡쳐 전문 스튜디오 로고">
<span>밍글 스튜디오</span> <span>밍글 스튜디오</span>
</a> </a>
</div> </div>
<ul class="nav-menu"> <ul class="nav-menu">
<li><a href="/" class="nav-link">Home</a></li> <li><a href="/index.html" class="nav-link">Home</a></li>
<li><a href="/about" class="nav-link">About</a></li> <li><a href="/about.html" class="nav-link">About</a></li>
<li><a href="/services" class="nav-link">Services</a></li> <li><a href="/services.html" class="nav-link">Services</a></li>
<li><a href="/portfolio" class="nav-link">Portfolio</a></li> <li><a href="/portfolio.html" class="nav-link">Portfolio</a></li>
<li><a href="/gallery" class="nav-link">Gallery</a></li> <li><a href="/gallery.html" class="nav-link">Gallery</a></li>
<li><a href="/contact" class="nav-link">Contact</a></li> <li><a href="/contact.html" class="nav-link">Contact</a></li>
<li><a href="/qna" class="nav-link">Q&A</a></li> <li><a href="/qna.html" class="nav-link">Q&A</a></li>
</ul> </ul>
<div class="hamburger"> <div class="hamburger">
<span></span> <span></span>

View File

@ -27,7 +27,7 @@ if os.name == 'nt': # Windows
sys.stderr = codecs.getwriter('utf-8')(sys.stderr.detach()) sys.stderr = codecs.getwriter('utf-8')(sys.stderr.detach())
# 서버 설정 # 서버 설정
PORT = 3000 PORT = 8001
HOST = '0.0.0.0' # 모든 인터페이스에서 접근 가능 HOST = '0.0.0.0' # 모든 인터페이스에서 접근 가능
class CustomHTTPRequestHandler(http.server.SimpleHTTPRequestHandler): class CustomHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
@ -46,22 +46,6 @@ class CustomHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
def do_GET(self): def do_GET(self):
"""GET 요청 처리""" """GET 요청 처리"""
original_path = self.path
# .html로 직접 접근하는 경우 리다이렉트
if self.path.endswith('.html') and self.path != '/index.html':
clean_path = self.path[:-5] # .html 제거
self.send_response(301)
self.send_header('Location', clean_path)
self.end_headers()
return
# .html 확장자 없이 접근 시 자동으로 .html 추가
if not self.path.endswith('/') and '.' not in os.path.basename(self.path):
html_path = self.path + '.html'
if os.path.exists(html_path.lstrip('/')):
self.path = html_path
# 기본 파일 처리 # 기본 파일 처리
if self.path == '/': if self.path == '/':
self.path = '/index.html' self.path = '/index.html'