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
This commit is contained in:
2026-01-11 09:50:48 +01:00
parent 2a50e694a7
commit 5d529c9789
5 changed files with 27 additions and 278 deletions

View File

@@ -1,66 +1,40 @@
#!/bin/bash
# Deploy SummitWave landing page to Hetzner public_html via SFTP
# 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"
LOCAL_DIR="$(dirname "$0")/src"
# === UPLOAD ===
echo "Uploading website files to $USER@$SERVER:$REMOTE_DIR ..."
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
put -r $LOCAL_DIR/index.html
put -r $LOCAL_DIR/impressum.html
put -r $LOCAL_DIR/robots.txt
put -r $LOCAL_DIR/sitemap.xml
put -r $LOCAL_DIR/.htaccess
# Hauptbilder der Landingpage
mkdir img
cd img
put -r $LOCAL_DIR/img/*
cd ..
# Remove existing files
rm index.html
rm impressum.html
rm robots.txt
rm sitemap.xml
# Manual (HTML + Bilder + PHP + Logs)
mkdir manual
cd manual
# Remove img directory contents and directory
rm img/*
rmdir img
# statische HTML-Variante (Fallback / Direktaufrufe)
put -r $LOCAL_DIR/manual/index.html
# Remove manual directory contents (nested structure)
rm manual/logs/*
rmdir manual/logs
rm manual/img/*
rmdir manual/img
rm manual/*
rmdir manual
# PHP-basierte Manual-/Login-Dateien
put -r $LOCAL_DIR/manual/.htaccess
put -r $LOCAL_DIR/manual/index.php
put -r $LOCAL_DIR/manual/login.php
put -r $LOCAL_DIR/manual/auth.config.php
put -r $LOCAL_DIR/manual/auth.php
put -r $LOCAL_DIR/manual/logout.php
# Upload only the .htaccess for redirect
put $LOCAL_DIR/.htaccess
# Manual-Bilder
put -r $LOCAL_DIR/manual/beacon-front.jpg
mkdir img
cd img
put -r $LOCAL_DIR/manual/img/*
cd ..
# Manual-Zertifikat (Download)
mkdir cert
cd cert
put -r $LOCAL_DIR/manual/cert/*
cd ..
# Log-Verzeichnis für Zugriffsprotokolle
mkdir logs
cd logs
put -r $LOCAL_DIR/manual/logs/access.log
cd ..
cd ..
bye
EOF
echo "Deployment complete. Visit your site to verify: http://summitwave.eu/"
# BiLqHib8s5Ag2FmL
echo "Done. summitwave.eu now redirects 301 to www.summitwave.eu"