Skip to content

Commit 97f1a75

Browse files
authored
Create .htaccess
1 parent fa416c9 commit 97f1a75

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.vscode/xampp/apache/.htaccess

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# php_value display_errors 1
2+
# DirectoryIndex index.html index.php
3+
4+
# PHP 8.2
5+
AddType application/x-httpd-php82 .php
6+
7+
# Dir listing disabled
8+
Options -Indexes
9+
10+
# Enable rewrite
11+
RewriteEngine On
12+
RewriteBase /
13+
14+
# Non-www
15+
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
16+
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
17+
18+
# Http to https
19+
RewriteCond %{HTTPS} off
20+
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
21+
22+
# Https to http
23+
# RewriteCond %{HTTPS} on
24+
# RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
25+
26+
# Redirect domain
27+
# RewriteCond %{HTTP_HOST} ^atomjoy.test$ [OR]
28+
# RewriteCond %{HTTP_HOST} ^www.atomjoy.test$
29+
# RewriteRule (.*)$ https://atomjoy.github.io/$1 [R=301,L]

0 commit comments

Comments
 (0)