GovanifY/WebClient/master/src/.htaccess - Htaccess File

GovanifY/WebClient/master/src/.htaccess

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Take care of index
RewriteRule ^$ static/index.html [L]

# HTML files
RewriteCond %{DOCUMENT_ROOT}/static/$1.html -f
RewriteRule ^(.*?)(.html)?$ static/$1.html [NC,L]

# Simple static prepend for non-HTML files
RewriteCond %{DOCUMENT_ROOT}/static/$1 -f
RewriteRule ^(.*)$ static/$1 [NC,L]

# If pages, 301 redirect
RewriteCond %{DOCUMENT_ROOT}/static/$1.html -f
RewriteRule ^pages/(.*?)(.html)?$ /$1 [NC,L,R=301]

Redirect 301 /create-account /invite
Redirect 301 /pages/join-us /careers

Redirect 301 /webby /why-protonmail
Redirect 301 /swissnex /why-protonmail
Redirect 301 /blogsofwar /why-protonmail
Redirect 301 /bolehvpn /why-protonmail
Redirect 301 /privacyforall /why-protonmail

# Hide .git stuff
RewriteRule ^.*?.git.* /app.html [NC,L]

# Hide static, doesn't work
#RewriteRule ^static.* /app.html [NC,L]

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^(.*) /app.html [NC,L]

On Github License

Files

Download PDF of Htaccess file
DOCUMENT_ROOT, HTTP_HOST, HTTPS, REQUEST_FILENAME, REQUEST_URI, static

Comments

Apache