https://github.com/jack-carling/htaccess
Apache .htaccess for https and SPA
https://github.com/jack-carling/htaccess
htaccess
Last synced: 5 months ago
JSON representation
Apache .htaccess for https and SPA
- Host: GitHub
- URL: https://github.com/jack-carling/htaccess
- Owner: jack-carling
- Created: 2022-07-23T18:35:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-23T18:39:02.000Z (almost 4 years ago)
- Last Synced: 2025-08-16T23:49:42.025Z (11 months ago)
- Topics: htaccess
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Apache
```
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
```
Rewrite to https and enable single page applications, requires custom 404 handling. Place `.htaccess` file in root directory.