-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.htaccess
31 lines (20 loc) · 1.28 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
# Set PHP's include path to the following, either in this .htaccess file or in the main Apache config
# .:/geoloqi.com/include:/geoloqi.com/themes:/common.geoloqi.com/include
RewriteEngine on
# Home page
RewriteRule ^$ index.php?controller=home&method=index [QSA,L]
RewriteRule ^(settings|help)$ index.php?controller=$1&method=index [QSA,L]
RewriteRule ^(login)$ /account/login [R=permanent,L]
# Generic error page when we don't know what went wrong
RewriteRule ^error$ index.php?controller=error&method=index [QSA,L]
# AJAX controllers (i.e. geoloqi.com/settings/profile.ajax)
RewriteRule ^(account|connect|map|settings|help|oauth)/([^/\.]+)\.ajax$ index.php?controller=$1&method=$2&mode=ajax [QSA,L]
# All other pages (i.e. geoloqi.com/settings/profile)
RewriteRule ^(about|account|connect|map|settings|help|oauth|post)/([^/\.]+)$ index.php?controller=$1&method=$2 [QSA,L]
RewriteRule ^(account|layer|settings)/([^/\.]+)/([^/\.]+)$ index.php?controller=$1&method=$2&value=$3 [QSA,L]
# User pages short form (geoloqi.com/aaronpk)
RewriteRule ^([^/\.]+)$ index.php?controller=map&method=index&value=$1 [QSA,L]
# Shared links
RewriteRule ^([^/\.]+)/([a-zA-Z0-9_]{7})$ index.php?controller=map&method=index&value=$1&key=$2 [QSA,L]
# Error handler
ErrorDocument 404 /index.php?controller=error&method=index