new tab opening 404 issue solved

This commit is contained in:
akash 2025-12-08 23:39:21 +05:30
parent ed302a8a1c
commit 48989c9ce2
5 changed files with 162 additions and 34 deletions

39
deploy.bat Normal file
View File

@ -0,0 +1,39 @@
@echo off
echo ========================================
echo Antalya Restaurant - Deploy Script
echo ========================================
echo.
echo Step 1: Building site...
call npm run build
if %ERRORLEVEL% NEQ 0 (
echo Build failed! Please fix errors and try again.
pause
exit /b %ERRORLEVEL%
)
echo.
echo ========================================
echo Build successful!
echo ========================================
echo.
echo IMPORTANT: Upload ALL contents from the 'out' folder to your server.
echo.
echo Make sure to upload:
echo - All HTML files and folders
echo - The .htaccess file (Apache servers)
echo - The web.config file (IIS servers)
echo - All _next folder contents
echo - All images folder
echo.
echo Server upload location: public_html or www folder
echo.
echo After upload, test these URLs:
echo https://antalya.metatronnest.com/
echo https://antalya.metatronnest.com/about-antalya-restaurant/
echo https://antalya.metatronnest.com/antalya-turkish-food-blog/
echo.
pause

View File

@ -1,40 +1,36 @@
# Antalya Restaurant - Apache Configuration
# Handles trailing slashes and prevents 403 errors
# SIMPLIFIED - Fixes 404 errors on refresh/new tab 100%
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Force HTTPS (optional, uncomment if needed)
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
# Handle trailing slashes
# If a directory exists with the name, serve its index.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_FILENAME}/index.html -f
RewriteRule ^(.*)$ $1/ [R=301,L]
# Serve index.html for directories
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ $1/index.html [L]
# Specific rewrites for main pages (with and without trailing slash)
RewriteRule ^about-antalya-restaurant/?$ about-antalya-restaurant/index.html [L]
RewriteRule ^antalya-restaurant-menu/?$ antalya-restaurant-menu/index.html [L]
RewriteRule ^antalya-restaurant-gallery/?$ antalya-restaurant-gallery/index.html [L]
RewriteRule ^book-a-table/?$ book-a-table/index.html [L]
RewriteRule ^catering-services-ontario/?$ catering-services-ontario/index.html [L]
RewriteRule ^antalya-turkish-food-blog/?$ antalya-turkish-food-blog/index.html [L]
# Blog posts
RewriteRule ^antalya-turkish-food-blog/([^/]+)/?$ antalya-turkish-food-blog/$1/index.html [L]
# Prevent directory listing
Options -Indexes
# Custom error pages
# Skip if file exists
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
# Skip if directory exists
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Add trailing slash if missing and directory exists
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}/ -d
RewriteRule ^(.*)$ $1/ [R=301,L]
# Serve index.html from directory if it exists
RewriteCond %{REQUEST_URI} (.*)/$
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}index.html -f
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}%{REQUEST_URI}index.html [L]
# Fallback: try to serve as directory with index.html
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}/index.html -f
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}%{REQUEST_URI}/index.html [L]
# Custom 404 page
ErrorDocument 404 /404.html
</IfModule>

View File

@ -591,6 +591,7 @@
.faqQuestion:hover {
background-color: #c49c5c;
color: #fff;
}
.faqQuestionActive {
@ -602,11 +603,15 @@
font-size: 1.5rem;
font-weight: bold;
color: var(--color-paragraph);
transition: transform 0.3s ease;
transition: transform 0.3s ease, color 0.3s ease;
flex-shrink: 0;
margin-left: 1rem;
}
.faqQuestion:hover .faqIcon {
color: #fff;
}
.faqQuestionActive .faqIcon {
color: #fff;
transform: rotate(180deg);
@ -670,12 +675,12 @@
}
.sliderBtn:first-child {
left: -6px;
}
left: -6px;
}
.sliderBtn:last-child {
right: -6px;
}
.sliderBtn:last-child {
right: -6px;
}
}

View File

@ -206,6 +206,81 @@
color: #d3cab3;
}
/* Tablet Layout: 769px to 1200px */
@media (min-width: 769px) and (max-width: 1200px) {
.footer {
padding: 50px 30px;
}
.borderWrapper {
padding: 30px;
}
.container {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 2rem;
max-width: 100%;
}
.brandColumn {
flex: unset;
min-width: unset;
}
.linksColumn {
flex: unset;
min-width: unset;
align-items: center;
justify-content: flex-start;
}
.locationColumn {
flex: unset;
min-width: unset;
}
.linkList {
text-align: center;
}
/* Location and Hours Layout */
.locationHoursWrapper {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.locationBlock {
text-align: left;
}
.hoursBlock {
text-align: left;
}
.hoursBlock .subHeading {
margin-top: 0;
}
.description {
max-width: 100%;
font-size: 0.9rem;
}
.logoImage {
height: 100px;
}
.heading {
font-size: 1.4rem;
}
.link {
font-size: 1rem;
}
}
@media (max-width: 1024px) {
.container {
gap: 2rem;

View File

@ -144,6 +144,19 @@
color: var(--color-paragraph);
}
@media (max-width: 1200px) {
.navLink {
color: var(--color-paragraph);
text-decoration: none;
font-size: 22px;
font-weight: 400;
letter-spacing: 0.5px;
transition: all 0.3s ease;
position: relative;
font-family: 'Canva Sans', sans-serif;
}
}
@media (max-width: 1024px) {
.desktopMenu {
display: none;