From 8c4aeb606535be1ed348568a0824487150f14f83 Mon Sep 17 00:00:00 2001 From: Krystie Date: Thu, 13 Aug 2026 10:47:27 -0700 Subject: [PATCH] fix: add trailingSlash for clean URLs, rename /legal/ to /policies/ (cPanel blocks /legal/ path) - next.config.ts: enable trailingSlash:true so Next.js generates /page/index.html instead of /page.html, enabling Apache DirectoryIndex to serve clean URLs - Rename src/app/legal/ to src/app/policies/ because cPanel/Apache blocks the /legal/ URL path (returns 403 regardless of file permissions) - Update Footer.tsx and terms page links from /legal/ to /policies/ - .htaccess: add DirectoryIndex directive for subdirectory index.html serving - All 15 pages verified live on dashcaddy.net returning HTTP 200 --- next.config.ts | 1 + public/.htaccess | 3 +++ src/app/{legal => policies}/privacy/page.tsx | 0 src/app/{legal => policies}/terms/page.tsx | 2 +- src/components/Footer.tsx | 4 ++-- 5 files changed, 7 insertions(+), 3 deletions(-) rename src/app/{legal => policies}/privacy/page.tsx (100%) rename src/app/{legal => policies}/terms/page.tsx (96%) diff --git a/next.config.ts b/next.config.ts index 7ed51ab..eb4b0b0 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,5 +1,6 @@ const nextConfig = { output: "export", + trailingSlash: true, images: { unoptimized: true } }; export default nextConfig; diff --git a/public/.htaccess b/public/.htaccess index 197f811..a92fd7b 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,3 +1,6 @@ +# Enable directory index resolution (serves index.html from subdirectories) +DirectoryIndex index.html index.html.var + # Redirect old doc paths to new ones — using RewriteRule for broader compatibility RewriteEngine On diff --git a/src/app/legal/privacy/page.tsx b/src/app/policies/privacy/page.tsx similarity index 100% rename from src/app/legal/privacy/page.tsx rename to src/app/policies/privacy/page.tsx diff --git a/src/app/legal/terms/page.tsx b/src/app/policies/terms/page.tsx similarity index 96% rename from src/app/legal/terms/page.tsx rename to src/app/policies/terms/page.tsx index 3e77279..d8b603d 100644 --- a/src/app/legal/terms/page.tsx +++ b/src/app/policies/terms/page.tsx @@ -59,7 +59,7 @@ export default function TermsPage() {

6. Privacy

We collect no data. See our{' '} - Privacy Policy{' '} + Privacy Policy{' '} for details.

diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 37b04c4..015b0ff 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -38,8 +38,8 @@ export default function Footer() { links: [ { label: 'Contact', href: 'mailto:support@dashcaddy.net' }, { label: 'Docs', href: '/docs' }, - { label: 'Privacy Policy', href: '/legal/privacy' }, - { label: 'Terms of Service', href: '/legal/terms' }, + { label: 'Privacy Policy', href: '/policies/privacy' }, + { label: 'Terms of Service', href: '/policies/terms' }, ], }, ];