-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.htaccess
23 lines (19 loc) · 914 Bytes
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Enable rewrite engine and route requests to framework
RewriteEngine On
# Some servers require you to specify the `RewriteBase` directive
# In such cases, it should be the path (relative to the document root)
# containing this .htaccess file
#
# RewriteBase "/"
# rewrite old links v2
RewriteCond %{REQUEST_URI}~%{QUERY_STRING} ^(.*?\/*)?(modules/challenges/)?(contact|browse|viewpage|viewuser|viewstory|viewseries|reviews|challenges|news)\.php~?(.+)$ [NC]
RewriteRule ^(.+).php$ %1/redirect/%3/%4 [R=301,L,NE]
# F3 generic rewrite
# https://fatfreeframework.com/routing-engine#SampleApacheConfiguration
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
# Protect files in data and tmp folder
RewriteRule ^(data|tmp)\/|\*$ - [R=403]