forked from wishthis/wishthis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
30 lines (24 loc) · 1.05 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
#
# Rewrite
#
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Page
RewriteRule ([a-z\-]+)$ /index.php?page=$1 [QSA,L]
# Wishlists (My lists)
RewriteRule wishlists/([0-9]+)$ /index.php?page=wishlists&id=$1 [QSA,L]
RewriteRule wishlists/([0-9]+)/add$ /index.php?page=wishlists&id=$1&wish_add=true [QSA,L]
# Wishlist
RewriteRule wishlist/([0-9a-f]{40})$ /index.php?page=wishlist&hash=$1 [QSA,L]
# Blog Post
RewriteRule blog/([a-z\-0-9]+)$ /index.php?page=post&slug=$1 [QSA,L]
# API
RewriteRule api/([a-zA-Z\-0-9=]+)$ /index.php?page=api&module=$1 [QSA,L]
RewriteRule api/statistics/([a-zA-Z0-9=]+)$ /index.php?page=api&module=statistics&table=$1 [QSA,L]
RewriteRule api/url/([a-zA-Z0-9=]+)$ /index.php?page=api&module=url&url=$1 [QSA,L]
RewriteRule api/wishlists/([0-9]+)$ /index.php?page=api&module=wishlists&wishlist_id=$1 [QSA,L]
RewriteRule api/wishlists/([0-9a-f]{40})$ /index.php?page=api&module=wishlists&wishlist_hash=$1 [QSA,L]
</IfModule>