|
|
87d2882 |
Alias /sticky-notes "/usr/share/sticky-notes"
|
|
|
87d2882 |
|
|
|
f86febf |
<Directory "/usr/share/sticky-notes">
|
|
|
ff7c1f1 |
|
|
|
ff7c1f1 |
# ACL for Apache 2.4
|
|
|
ff7c1f1 |
<IfModule mod_authz_core.c>
|
|
|
ff7c1f1 |
Require local
|
|
|
ff7c1f1 |
</IfModule>
|
|
|
ff7c1f1 |
|
|
|
ff7c1f1 |
# ACL for Apache 2.2
|
|
|
ff7c1f1 |
<IfModule !mod_authz_core.c>
|
|
|
ff7c1f1 |
Order Deny,Allow
|
|
|
ff7c1f1 |
Deny from all
|
|
|
ff7c1f1 |
Allow from 127.0.0.1
|
|
|
ff7c1f1 |
Allow from ::1
|
|
|
ff7c1f1 |
</IfModule>
|
|
|
ff7c1f1 |
|
|
|
ff7c1f1 |
# URL rewriting
|
|
|
87d2882 |
<IfModule mod_rewrite.c>
|
|
|
87d2882 |
# Tell PHP that rewrite rules are available
|
|
|
87d2882 |
SetEnv HTTP_MOD_REWRITE On
|
|
|
87d2882 |
|
|
|
87d2882 |
# Rewrite rules
|
|
|
87d2882 |
RewriteEngine on
|
|
|
87d2882 |
|
|
|
87d2882 |
RewriteBase /sticky-notes
|
|
|
f86febf |
|
|
|
f86febf |
# Setup links
|
|
|
87d2882 |
RewriteRule ^install/?$ install.php [NC]
|
|
|
f86febf |
RewriteRule ^upgrade/?$ upgrade.php [NC]
|
|
|
87d2882 |
|
|
|
87d2882 |
# Documentation links
|
|
|
87d2882 |
RewriteRule ^doc/([a-z]+)/?$ doc.php?cat=$1 [NC]
|
|
|
87d2882 |
RewriteRule ^~([a-z.]+)/doc/([a-z]+)/?$ doc.php?project=$1&cat=$2 [NC]
|
|
|
87d2882 |
|
|
|
87d2882 |
# Home page links
|
|
|
87d2882 |
RewriteRule ^~([a-z.]+)/?$ index.php?project=$1 [NC]
|
|
|
87d2882 |
RewriteRule ^~([a-z.]+)/api/([a-z]+)/?$ index.php?project=$1&mode=$2 [NC]
|
|
|
87d2882 |
|
|
|
f86febf |
# Paste list, trending and RSS
|
|
|
87d2882 |
RewriteRule ^all/?$ list.php [NC]
|
|
|
87d2882 |
RewriteRule ^api/([a-z]+)/all/?$ list.php?mode=$1 [NC]
|
|
|
87d2882 |
RewriteRule ^~([a-z.]+)/all/?$ list.php?project=$1 [NC]
|
|
|
87d2882 |
RewriteRule ^~([a-z.]+)/api/([a-z]+)/all/?$ list.php?project=$1&mode=$2 [NC]
|
|
|
87d2882 |
RewriteRule ^all/([0-9]+)/?$ list.php?page=$1 [NC]
|
|
|
87d2882 |
RewriteRule ^api/([a-z]+)/all/([0-9]+)/?$ list.php?mode=$1&page=$2 [NC]
|
|
|
87d2882 |
RewriteRule ^~([a-z.]+)/all/([0-9]+)/?$ list.php?project=$1&page=$2 [NC]
|
|
|
87d2882 |
RewriteRule ^~([a-z.]+)/api/([a-z]+)/all/([0-9]+)/?$ list.php?project=$1&mode=$2&page=$3 [NC]
|
|
|
f86febf |
RewriteRule ^trending/([a-z]+)/?$ list.php?trending=1&age=$1 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/trending/([a-z]+)/?$ list.php?project=$1&trending=1&age=$2 [NC]
|
|
|
f86febf |
RewriteRule ^trending/?$ list.php?trending=1 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/trending/?$ list.php?project=$1&trending=1 [NC]
|
|
|
f86febf |
RewriteRule ^rss/?$ list.php?rss=1 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/rss/?$ list.php?project=$1&rss=1 [NC]
|
|
|
87d2882 |
|
|
|
87d2882 |
# General links
|
|
|
f86febf |
RewriteRule ^([0-9]+|p[0-9a-zA-Z]{8})/?$ show.php?id=$1 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/([0-9]+|p[0-9a-zA-Z]{8})/?$ show.php?project=$1&id=$2 [NC]
|
|
|
f86febf |
RewriteRule ^([0-9]+|p[0-9a-zA-Z]{8})/([a-z|A-Z]+)/?$ show.php?id=$1&mode=$2 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/([0-9]+|p[0-9a-zA-Z]{8})/([a-z|A-Z]+)/?$ show.php?project=$1&id=$2&mode=$3 [NC]
|
|
|
f86febf |
RewriteRule ^api/([a-z|A-Z]+)/([0-9]+|p[0-9a-zA-Z]{8})/?$ show.php?mode=$1&id=$2 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/api/([a-z|A-Z]+)/([0-9]+|p[0-9a-zA-Z]{8})/?$ show.php?project=$1&mode=$2&id=$3 [NC]
|
|
|
f86febf |
RewriteRule ^([0-9]+|p[0-9a-zA-Z]{8})/([0-9]+)/?$ show.php?id=$1&hash=$2 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/([0-9]+|p[0-9a-zA-Z]{8})/([0-9]+)/?$ show.php?project=$1&id=$2&hash=$3 [NC]
|
|
|
f86febf |
RewriteRule ^([0-9]+|p[0-9a-zA-Z]{8})/([0-9]+)/([a-z|A-Z]+)/?$ show.php?id=$1&hash=$2&mode=$3 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/([0-9]+|p[0-9a-zA-Z]{8})/([0-9]+)/([a-z|A-Z]+)/?$ show.php?project=$1&id=$2&hash=$3&mode=$4 [NC]
|
|
|
f86febf |
RewriteRule ^api/([a-z|A-Z]+)/([0-9]+|p[0-9a-zA-Z]{8})/([0-9]+)/?$ show.php?mode=$1&id=$2&hash=$3 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/api/([a-z|A-Z]+)/([0-9]+|p[0-9a-zA-Z]{8})/([0-9]+)/?$ show.php?project=$1&mode=$2&id=$3&hash=$4 [NC]
|
|
|
f86febf |
RewriteRule ^api/([a-z|A-Z]+)/([0-9]+|p[0-9a-zA-Z]{8})/([0-9]+)/(.*)$ show.php?mode=$1&id=$2&hash=$3&password=$4 [NC]
|
|
|
f86febf |
RewriteRule ^~([a-z.]+)/api/([a-z|A-Z]+)/([0-9]+|p[0-9a-zA-Z]{8})/([0-9]+)/(.*)$ show.php?project=$1&mode=$2&id=$3&hash=$4&password=$5 [NC]
|
|
|
87d2882 |
</IfModule>
|
|
|
87d2882 |
</Directory>
|