Revision 8041
Added by Aaron Marcuse-Kubitza almost 12 years ago
.htaccess | ||
---|---|---|
28 | 28 |
RewriteCond %{REQUEST_FILENAME} -l |
29 | 29 |
RewriteRule ^.*$ - [discardpath,noescape,last] |
30 | 30 |
|
31 |
# don't redirect subdir paths |
|
32 |
RewriteCond %{DOCUMENT_ROOT}/$1 -d [ornext] |
|
33 |
RewriteCond %{DOCUMENT_ROOT}/$1 -l |
|
34 |
RewriteRule ^([^/]*).*$ - [discardpath,noescape,last] |
|
35 |
|
|
36 |
# handle DirectoryIndex (this must be at this position in the rules) |
|
37 |
RewriteRule ^(.*/)?index\.php$ $1 [discardpath,noescape] |
|
38 |
|
|
31 | 39 |
## translate dotpaths (after the last /) to /-paths, e.g. d/a.[b.c] -> d/a/b.c/ |
32 | 40 |
# replace all unescaped . with / , e.g. a.[b.c] -> a/[b.c] |
33 | 41 |
# remove any [] escape, e.g. a.b=[c.d] -> a/b=c.d (the ] must be at the end) |
... | ... | |
37 | 45 |
RewriteRule ^(.*/)?(?=.)([^./]*?)(?:\[([^\[\]/]*)\])?(?:\.([^/]*))?$ $1$2$3/$4 [discardpath,noescape,next] |
38 | 46 |
# discardpath: avoids infinite loop by not reappending PATH_INFO (filename) |
39 | 47 |
|
40 |
# non-filesystem paths |
|
41 |
ErrorDocument 404 / |
|
48 |
## specific to / |
|
49 |
|
|
50 |
RewriteRule ^(?:(.*)/)?$ https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/VegCore#$1 [discardpath,noescape,last] |
Also available in: Unified diff
web/main/.htaccess: Added fallback redirect to VegCore for paths without a namespace. This can be used to link to specific VegCore terms without needing to include the VegCore namespace.