-
Notifications
You must be signed in to change notification settings - Fork 10
/
.htaccess
27 lines (21 loc) · 1.25 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
# Uncomment these for debugging
# php_flag display_startup_errors on
# php_flag display_errors on
# php_flag html_errors on
RewriteEngine On
# Set the prefix for all matches
RewriteBase /api/
# Pass through these URL's, which are accessed from the index.html page
RewriteRule ^(css|js|rpc|themes)/(.*)$ $1/$2 [L]
# URLs from the application (rather than directly from the user) to get the tree data, or text to display in a tab.
# Ex: apidata/1.9/dijit/Dialog or apidata/1.3/tree.json. Process modules via item.php. In the future we will probably
# pre-generate the data so this will just map to an HTML file.
RewriteRule ^apidata/([^/]+)/tree.json$ lib/tree.php?v=$1 [L]
RewriteRule ^([^/]+)/tree.html$ lib/html-tree.php?v=$1 [L] # note: tree.html contains relative paths to permalink pages
RewriteRule ^apidata/(1.[3-7])/(.*)$ lib.old/item.php?v=$1&p=$2 [L,QSA]
RewriteRule ^apidata/([^/]+)/(.*)$ lib/item.php?v=$1&p=$2 [L,QSA]
# Workaround behavior where this file runs again after the RewriteRules above execute.
# Want to use the END flag instead of L flag but it's only available in Apache 2.4.
RewriteRule ^(lib|lib.old)/(.*)$ $1/$2 [L]
# For anything else (ex: permalink like 1.8/dijit/Dialog), handle it from index.php
RewriteRule ^(.*)$ index.php?qs=$1 [L,QSA]