Fix : 구글 서치어드바이저에서 페이지 색인 문제 해결
This commit is contained in:
parent
cb6444d6b8
commit
e27ee29dcc
63
.htaccess
Normal file
63
.htaccess
Normal file
@ -0,0 +1,63 @@
|
||||
# Enable URL rewriting
|
||||
RewriteEngine On
|
||||
|
||||
# Force HTTPS (if SSL is available)
|
||||
# RewriteCond %{HTTPS} off
|
||||
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
|
||||
# Remove trailing slashes
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||||
|
||||
# Remove .html extension
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^([^\.]+)$ $1.html [NC,L]
|
||||
|
||||
# Handle SPA routing - redirect all non-file requests to index.html
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*)$ /index.html [L]
|
||||
|
||||
# Handle 404 errors
|
||||
ErrorDocument 404 /index.html
|
||||
|
||||
# Enable compression
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
AddOutputFilterByType DEFLATE text/css
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
</IfModule>
|
||||
|
||||
# Set browser caching
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive on
|
||||
ExpiresByType text/css "access plus 1 year"
|
||||
ExpiresByType application/javascript "access plus 1 year"
|
||||
ExpiresByType image/png "access plus 1 year"
|
||||
ExpiresByType image/jpg "access plus 1 year"
|
||||
ExpiresByType image/jpeg "access plus 1 year"
|
||||
ExpiresByType image/gif "access plus 1 year"
|
||||
ExpiresByType image/webp "access plus 1 year"
|
||||
ExpiresByType image/svg+xml "access plus 1 year"
|
||||
</IfModule>
|
||||
|
||||
# Security headers
|
||||
<IfModule mod_headers.c>
|
||||
Header always set X-Content-Type-Options nosniff
|
||||
Header always set X-Frame-Options DENY
|
||||
Header always set X-XSS-Protection "1; mode=block"
|
||||
Header always set Referrer-Policy "strict-origin-when-cross-origin"
|
||||
</IfModule>
|
||||
|
||||
# Prevent access to sensitive files
|
||||
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak)$">
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
18
robots.txt
Normal file
18
robots.txt
Normal file
@ -0,0 +1,18 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
# Sitemap
|
||||
Sitemap: https://minglestudio.co.kr/sitemap.xml
|
||||
|
||||
# Disallow specific files and patterns
|
||||
Disallow: /cgi-bin/
|
||||
Disallow: /tmp/
|
||||
Disallow: /private/
|
||||
Disallow: /*#*
|
||||
|
||||
# Allow important files
|
||||
Allow: /index.html
|
||||
Allow: /styles.css
|
||||
Allow: /script.js
|
||||
Allow: /mingle-logo.webp
|
||||
Allow: /Studio_Image/
|
||||
75
script.js
75
script.js
@ -5,36 +5,86 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
const hamburger = document.querySelector('.hamburger');
|
||||
const navMenu = document.querySelector('.nav-menu');
|
||||
|
||||
if (hamburger) {
|
||||
hamburger.addEventListener('click', function() {
|
||||
hamburger.classList.toggle('active');
|
||||
navMenu.classList.toggle('active');
|
||||
});
|
||||
}
|
||||
|
||||
// 네비게이션 링크 클릭 시 모바일 메뉴 닫기
|
||||
document.querySelectorAll('.nav-link').forEach(link => {
|
||||
link.addEventListener('click', () => {
|
||||
hamburger.classList.remove('active');
|
||||
navMenu.classList.remove('active');
|
||||
if (hamburger) hamburger.classList.remove('active');
|
||||
if (navMenu) navMenu.classList.remove('active');
|
||||
});
|
||||
});
|
||||
|
||||
// 스무스 스크롤
|
||||
// 스무스 스크롤 (리디렉션 방지) - 개선된 버전
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
const target = document.querySelector(this.getAttribute('href'));
|
||||
const targetId = this.getAttribute('href');
|
||||
const target = document.querySelector(targetId);
|
||||
|
||||
if (target) {
|
||||
target.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start'
|
||||
// URL 업데이트 (히스토리 API 사용) - 리디렉션 방지
|
||||
if (history.pushState) {
|
||||
history.pushState(null, null, targetId);
|
||||
}
|
||||
|
||||
// 스무스 스크롤
|
||||
const headerOffset = 80; // 네비게이션 높이 고려
|
||||
const elementPosition = target.getBoundingClientRect().top;
|
||||
const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
|
||||
|
||||
window.scrollTo({
|
||||
top: offsetPosition,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 브라우저 뒤로가기/앞으로가기 처리
|
||||
window.addEventListener('popstate', function(e) {
|
||||
const hash = window.location.hash;
|
||||
if (hash) {
|
||||
const target = document.querySelector(hash);
|
||||
if (target) {
|
||||
const headerOffset = 80;
|
||||
const elementPosition = target.getBoundingClientRect().top;
|
||||
const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
|
||||
|
||||
window.scrollTo({
|
||||
top: offsetPosition,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 페이지 로드 시 해시가 있으면 해당 섹션으로 스크롤
|
||||
if (window.location.hash) {
|
||||
setTimeout(() => {
|
||||
const target = document.querySelector(window.location.hash);
|
||||
if (target) {
|
||||
const headerOffset = 80;
|
||||
const elementPosition = target.getBoundingClientRect().top;
|
||||
const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
|
||||
|
||||
window.scrollTo({
|
||||
top: offsetPosition,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
// 네비게이션 스크롤 효과
|
||||
window.addEventListener('scroll', function() {
|
||||
const navbar = document.querySelector('.navbar');
|
||||
if (navbar) {
|
||||
if (window.scrollY > 100) {
|
||||
navbar.style.background = 'rgba(255, 255, 255, 0.98)';
|
||||
navbar.style.boxShadow = '0 2px 20px rgba(0, 0, 0, 0.1)';
|
||||
@ -42,6 +92,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
navbar.style.background = 'rgba(255, 255, 255, 0.95)';
|
||||
navbar.style.boxShadow = 'none';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 폼 제출 처리
|
||||
@ -52,10 +103,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// 폼 데이터 수집
|
||||
const formData = new FormData(this);
|
||||
const name = this.querySelector('input[type="text"]').value;
|
||||
const email = this.querySelector('input[type="email"]').value;
|
||||
const subject = this.querySelectorAll('input[type="text"]')[1].value;
|
||||
const message = this.querySelector('textarea').value;
|
||||
const name = this.querySelector('input[type="text"]')?.value || '';
|
||||
const email = this.querySelector('input[type="email"]')?.value || '';
|
||||
const subject = this.querySelectorAll('input[type="text"]')[1]?.value || '';
|
||||
const message = this.querySelector('textarea')?.value || '';
|
||||
|
||||
// 간단한 유효성 검사
|
||||
if (!name || !email || !subject || !message) {
|
||||
@ -119,7 +170,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
setTimeout(() => {
|
||||
notification.style.transform = 'translateX(100%)';
|
||||
setTimeout(() => {
|
||||
if (notification.parentNode) {
|
||||
notification.remove();
|
||||
}
|
||||
}, 300);
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
9
sitemap.xml
Normal file
9
sitemap.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://minglestudio.co.kr/</loc>
|
||||
<lastmod>2025-01-27</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
</urlset>
|
||||
Loading…
x
Reference in New Issue
Block a user