- 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
38 lines
1.4 KiB
ApacheConf
38 lines
1.4 KiB
ApacheConf
# 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
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine On
|
|
RewriteRule ^docs/product-overview/?$ /docs/overview/ [R=301,L]
|
|
RewriteRule ^docs/deploy-first-service/?$ /docs/first-service/ [R=301,L]
|
|
RewriteRule ^docs/premium-features/?$ /docs/premium/ [R=301,L]
|
|
RewriteRule ^docs/infrastructure/?$ /docs/integrations/ [R=301,L]
|
|
</IfModule>
|
|
|
|
# Fallback using mod_alias Redirect if available
|
|
<IfModule mod_alias.c>
|
|
Redirect 301 /docs/product-overview /docs/overview/
|
|
Redirect 301 /docs/deploy-first-service /docs/first-service/
|
|
Redirect 301 /docs/premium-features /docs/premium/
|
|
Redirect 301 /docs/infrastructure /docs/integrations/
|
|
</IfModule>
|
|
|
|
# Set cache headers for static assets
|
|
<IfModule mod_expires.c>
|
|
ExpiresActive On
|
|
ExpiresByType text/css "access plus 1 month"
|
|
ExpiresByType application/javascript "access plus 1 month"
|
|
ExpiresByType image/png "access plus 1 month"
|
|
ExpiresByType image/svg+xml "access plus 1 month"
|
|
ExpiresByType image/x-icon "access plus 1 year"
|
|
</IfModule>
|
|
|
|
# Enable compression
|
|
<IfModule mod_deflate.c>
|
|
AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/json
|
|
</IfModule>
|
|
|
|
# Custom 404 page
|
|
ErrorDocument 404 /404.html
|