-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.htaccess
More file actions
31 lines (26 loc) · 1.08 KB
/
.htaccess
File metadata and controls
31 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
RewriteRule ^(.*)$ $1/ [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^\.]+)/$ $1.php
RewriteCond %{THE_REQUEST} \s/([^.]+)\.html [NC]
RewriteRule ^ /%1 [NE,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)/?$ /$1.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(f)/?$ index.php?f=$1
RewriteRule ^([^/]+)/?$ index.php?f=$1
RewriteRule ^invite/([A-Za-z0-9-]+)/?$ index.php?invite=$1 [NC]
RewriteRule ^invite/([A-Za-z0-9-]+)/?$ register/index.php?invite=$1 [NC]
RewriteRule ^profile/([A-Za-z0-9-]+)/?$ dashboard/user?profile=$1 [NC]
RewriteRule ^paste/([A-Za-z0-9-]+)/?$ dashboard/paste?paste-id=$1 [NC]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_URI} "^/api/upload"
RewriteRule (.*) upload.php [L]
RewriteCond %{REQUEST_URI} "^/api/domains/list"
RewriteRule (.*) api/domains.php [L]
RewriteCond %{REQUEST_URI} "^/api/stats"
RewriteRule (.*) api/stats.php [L]