Files
summitwave_landing/deploy_to_hetzner.sh
mheuer 5d529c9789 feat: replace SummitWave site with 301 redirect from apex to www subdomain
- Update deployment script to clear all existing files and upload only .htaccess
- Remove landing page (index.html), impressum, robots.txt, sitemap.xml
- Remove all img directory contents and manual directory (including PHP auth, logs, images)
- Simplify .htaccess to redirect summitwave.eu → www.summitwave.eu with 301
- Delete empty optimize_device.sh and sftp files
- Update deployment comments to reflect redirect-only
2026-01-11 09:54:01 +01:00

41 lines
863 B
Bash
Executable File

#!/bin/bash
# Clear SummitWave site and set up 301 redirect from summitwave.eu to www.summitwave.eu
# === CONFIGURATION ===
SERVER="www269.your-server.de"
USER="summitb"
REMOTE_DIR="public_html"
LOCAL_DIR="$(dirname "$0")/src"
echo "Clearing website and setting up redirect on $USER@$SERVER:$REMOTE_DIR ..."
# Connect via SFTP: clear existing files, then upload only .htaccess
sftp $USER@$SERVER <<EOF
cd $REMOTE_DIR
# Remove existing files
rm index.html
rm impressum.html
rm robots.txt
rm sitemap.xml
# Remove img directory contents and directory
rm img/*
rmdir img
# Remove manual directory contents (nested structure)
rm manual/logs/*
rmdir manual/logs
rm manual/img/*
rmdir manual/img
rm manual/*
rmdir manual
# Upload only the .htaccess for redirect
put $LOCAL_DIR/.htaccess
bye
EOF
echo "Done. summitwave.eu now redirects 301 to www.summitwave.eu"