# Enjoy Gulf Coast -- generated by generator/build.php. Do not hand-edit.
# Canonical host: https://enjoygulfcoast.com (apex). www -> apex, http -> https.

DirectoryIndex index.html index.php
Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On

# http -> https (before the host check so both normalize in one hop when possible)
RewriteCond %{HTTPS} off
RewriteRule ^ https://enjoygulfcoast.com%{REQUEST_URI} [R=301,L]

# www -> apex
RewriteCond %{HTTP_HOST} ^www\.enjoygulfcoast\.com$ [NC]
RewriteRule ^ https://enjoygulfcoast.com%{REQUEST_URI} [R=301,L]

# Trailing-slash enforcement for page URLs only.
# Static assets are excluded by extension on %{REQUEST_URI} (not
# %{REQUEST_FILENAME}): on some hosts the filename does not resolve
# to the real file during the rewrite phase, which wrongly 301s a
# real file like /assets/site.css to /assets/site.css/.
RewriteCond %{REQUEST_URI} !\.(css|js|mjs|jpe?g|png|webp|gif|svg|ico|json|xml|txt|pdf|woff2?|ttf|otf|eot)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*[^/])$ /$1/ [R=301,L]

</IfModule>

ErrorDocument 404 /404.html

Redirect 301 /rss.xml https://enjoygulfcoast.com/rockport-fulton/rss.xml
Redirect 301 /rising.xml https://enjoygulfcoast.com/rockport-fulton/stories/rockport-rising.xml
