-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
47 lines (38 loc) · 2.48 KB
/
.htaccess
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
45
46
47
RewriteEngine On
RewriteRule ^config.*$ / [R=301,L]
RewriteRule ^cat-(.*)-([0-9]+)-page-([0-9]+)$ index.php?controller=listing&action=category&category_id=$2&page=$3 [L]
RewriteRule ^cat-(.*)-([0-9]+)$ index.php?controller=listing&action=category&category_id=$2 [L]
RewriteRule ^art-(.*)-([0-9]+)$ index.php?controller=article&action=article&art=$2 [L]
RewriteRule ^like-([0-9]+)$ index.php?controller=article&action=like&art=$1 [L]
#DIY
RewriteRule ^diy$ index.php?controller=home&action=main&diy=1 [L]
RewriteRule ^diy-page-([0-9]+)$ index.php?controller=home&action=main&page=$1&diy=1 [L]
# Static pages
RewriteRule ^contact$ index.php?controller=staticpages&action=contact [L]
RewriteRule ^about$ index.php?controller=staticpages&action=apropos [L]
RewriteRule ^helphtml$ index.php?controller=staticpages&action=helphtml [L]
# Admin
RewriteRule ^admin$ index.php?controller=staticpages&action=admin [L]
RewriteRule ^logout$ index.php?controller=staticpages&action=logout [L]
RewriteRule ^last_comments$ index.php?controller=comments&action=last_unread [L]
RewriteRule ^mark_comment/([0-9]+)/([0-9]+)$ index.php?controller=comments&action=mark_read&com_id=$1&art_id=$2 [L]
RewriteRule ^mark_read_all_comments$ index.php?controller=comments&action=mark_all_read [L]
RewriteRule ^delete_comment/([0-9]+)$ index.php?controller=comments&action=delete&com_id=$1 [L]
# Admin categories
RewriteRule ^new_cat$ index.php?controller=category&action=new_cat [L]
RewriteRule ^list_cat$ index.php?controller=category&action=list_cat [L]
RewriteRule ^mod_cat/([0-9]+)$ index.php?controller=category&action=new_cat&cat_id=$1 [L]
RewriteRule ^del_cat/([0-9]+)$ index.php?controller=category&action=del_cat&cat_id=$1 [L]
# Article gestion
RewriteRule ^article_new$ index.php?controller=article&action=new_art [L]
RewriteRule ^article_edit-([0-9]+)$ index.php?controller=article&action=new_art&art_id=$1 [L]
RewriteRule ^article_delete-([0-9]+)$ index.php?controller=article&action=delete_art&art_id=$1 [L]
# Archives
RewriteRule ^get_months$ index.php?controller=ajax&action=get_months [L]
RewriteRule ^archive-page-([0-9]+)$ index.php?controller=home&action=main&page=$1 [L]
RewriteRule ^archive-([0-9]+)-([0-9]+)$ index.php?controller=listing&action=month&month=$1&year=$2 [L]
RewriteRule ^archive-([0-9]+)-([0-9]+)-page-([0-9]+)$ index.php?controller=listing&action=month&page=$3&month=$1&year=$2 [L]
#AuthType Basic
#AuthName "Danger zone"
#AuthUserFile /home/camille/melmelboo.fr/test/.htpasswd
#Require valid-user