-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess.default
44 lines (35 loc) · 1.48 KB
/
.htaccess.default
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
RewriteEngine On
# BSE's root directory.
# Not always needed, depending on your hosting
RewriteBase /
# connexion pages
RewriteRule ^login\.html$ connexion.php [L]
RewriteRule ^logout\.html$ connexion.php?act=logout [L]
# commits feed
RewriteRule ^commits-feed.php?format=(.*)$ commits/$1
RewriteRule ^feeds/commits\.(atom|rss)$ commits/$1
# admin-actualités-ACTION[-ID].html
RewriteRule ^admin-(actualités|medias)-([^-]+)(?:-([0-9]+))?\.html$ admin.php?page=$1&action=$2&id=$3 [L]
# admin-administrateurs-PSEUDO[-ACTION].html
RewriteRule ^admin-(administrateurs)-([^-]+)(?:-(.+))?\.html$ admin.php?page=$1&action=$2&pseudo=$3 [L]
# admin-PAGE.html
RewriteRule ^admin-(.+)\.html$ admin.php?page=$1 [L]
### Start backward compatibility rewrites
# news-pageNUM[.html]
RewriteRule ^news-page([0-9]+)(?:\.html)?$ news/index/$1
# news-ID[...[.html]]
RewriteRule ^news-([0-9]+)(?:-.*)?(?:\.html)?$ news/view/$1
# medias-TYPE[.html]
RewriteRule ^medias-([0-9,]*)(?:\.html)?$ medias/index/$1
# medias-TYPE-TAGS.html
RewriteRule ^medias-([0-9,]*)-(.*)\.html$ medias/index/$1/$2
# media-ID[-NOTRETURN[...[.html]]]
RewriteRule ^media-([0-9]+)(?:-([01]))?(?:-.*)?(?:\.html)?$ medias/view/$1/$2
# strip .html and .php suffix in the page name
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)\.(?:html|php)(/.*)?$ $1$2
### End backward compatibility rewrites
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]