This repository was archived by the owner on May 27, 2025. It is now read-only.
forked from theuni/Addon-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
44 lines (38 loc) · 1.84 KB
/
.htaccess
File metadata and controls
44 lines (38 loc) · 1.84 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
32
33
34
35
36
37
38
39
40
41
42
43
44
<IfModule mod_rewrite.c>
RewriteEngine on
# Rule for versioned static files
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
# exclude specific folders from redirection
RewriteRule ^(favicon\.ico|images|js|stylesheets|cache)/ - [L]
# rewrite old urls to new ones
#old authors
RewriteCond %{QUERY_STRING} ^(.*&|\A)a=(.+)?
RewriteRule ^browse.php$ http://%{HTTP_HOST}/author/%2/? [L,R=301]
# old details view
RewriteCond %{QUERY_STRING} ^(.*&|\A)t=(.+)?
RewriteRule ^details.php$ http://%{HTTP_HOST}/show/%2/? [L,R=301]
# old categories
RewriteCond %{QUERY_STRING} ^(.*&|\A)t=plugin\.image?
RewriteRule ^browse.php$ http://%{HTTP_HOST}/category/pictures/? [L,R=301]
RewriteCond %{QUERY_STRING} ^(.*&|\A)t=plugin\.video?
RewriteRule ^browse.php$ http://%{HTTP_HOST}/category/video/? [L,R=301]
RewriteCond %{QUERY_STRING} ^(.*&|\A)t=plugin\.audio?
RewriteRule ^browse.php$ http://%{HTTP_HOST}/category/audio/? [L,R=301]
RewriteCond %{QUERY_STRING} ^(.*&|\A)t=plugin\.games?
RewriteRule ^browse.php$ http://%{HTTP_HOST}/category/programs/? [L,R=301]
RewriteCond %{QUERY_STRING} ^(.*&|\A)t=plugin\.program?
RewriteRule ^browse.php$ http://%{HTTP_HOST}/category/programs/? [L,R=301]
RewriteCond %{QUERY_STRING} ^(.*&|\A)t=script?
RewriteRule ^browse.php$ http://%{HTTP_HOST}/category/scripts/? [L,R=301]
RewriteCond %{QUERY_STRING} ^(.*&|\A)t=skin?
RewriteRule ^browse.php$ http://%{HTTP_HOST}/category/skins/? [L,R=301]
RewriteCond %{QUERY_STRING} ^(.*&|\A)(c|t)=(.+)?
RewriteRule ^browse.php$ http://%{HTTP_HOST}/category/%3/? [L,R=301]
# If file/symlink/directory doesn't exist, redirect to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.*/?$ index.php [L]
</IfModule>