Revision 13114
Added by Aaron Marcuse-Kubitza over 10 years ago
.htaccess | ||
---|---|---|
10 | 10 |
RewriteRule ^\[(.*)\](?:/(.*))?$ $2 [discardpath,noescape,qsappend,env=base_url:http://$1] |
11 | 11 |
|
12 | 12 |
# extract path components 1st->last |
13 |
# can't use subject param because that goes to the last selected tab, not the |
|
14 |
# default (leftmost) tab |
|
15 |
RewriteRule ^ - [discardpath,noescape,qsappend,env=page:servers] |
|
16 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?server=$1 [discardpath,noescape,qsappend,env=page:all_db] |
|
17 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?database=$1 [discardpath,noescape,qsappend,env=page:schemas] |
|
18 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?schema=$1 [discardpath,noescape,qsappend,env=page:tables] |
|
19 |
RewriteRule ^(views|functions)()$ $2 [discardpath,noescape,qsappend,env=page:$1] |
|
20 |
RewriteRule ^view=([^/]+)(?:/(.*))?$ $2?view=$1&action=definition [discardpath,noescape,qsappend,skip=2,env=page:viewproperties] |
|
21 |
RewriteRule ^fn.oid=([^/]+)(?:/(.*))?$ $2?function_oid=$1&action=properties [discardpath,noescape,qsappend,skip=1,env=page:functions] |
|
22 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?table=$1 [discardpath,noescape,qsappend,env=page:tblproperties] |
|
23 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?column=$1 [discardpath,noescape,qsappend,env=page:colproperties] |
|
13 |
# |
|
14 |
# phpPgAdmin bug causes page to be ignored when not logged in. this is partially |
|
15 |
# fixed by also specifying subject, which is not ignored. (however, when it |
|
16 |
# falls back to using subject, it will go to the last selected tab, not the |
|
17 |
# default, leftmost tab.) |
|
18 |
# |
|
19 |
# subject values @ /usr/share/phppgadmin/classes/Misc.php#getSubjectParams() |
|
20 |
RewriteRule ^ - [discardpath,noescape,qsappend,env=subject:root,env=page:servers] |
|
21 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?server=$1 [discardpath,noescape,qsappend,env=subject:server,env=page:all_db] |
|
22 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?database=$1 [discardpath,noescape,qsappend,env=subject:database,env=page:schemas] |
|
23 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?schema=$1 [discardpath,noescape,qsappend,env=subject:schema,env=page:tables] |
|
24 |
RewriteRule ^(views|functions)()$ $2 [discardpath,noescape,qsappend,env=subject:schema,env=page:$1] |
|
25 |
RewriteRule ^view=([^/]+)(?:/(.*))?$ $2?view=$1&action=definition [discardpath,noescape,qsappend,skip=2,env=subject:view,env=page:viewproperties] |
|
26 |
RewriteRule ^fn.oid=([^/]+)(?:/(.*))?$ $2?function_oid=$1&action=properties [discardpath,noescape,qsappend,skip=1,env=subject:function,env=page:functions] |
|
27 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?table=$1 [discardpath,noescape,qsappend,env=subject:table,env=page:tblproperties] |
|
28 |
RewriteRule ^([^/]+)(?:/(.*))?$ $2?column=$1 [discardpath,noescape,qsappend,env=subject:column,env=page:colproperties] |
|
24 | 29 |
|
25 | 30 |
# redirect to now-constructed URL |
26 | 31 |
RewriteCond %{ENV:base_url} !="" |
27 |
RewriteRule ^$ %{ENV:base_url}/%{ENV:page}.php [discardpath,last,noescape,qsappend,redirect] |
|
32 |
RewriteRule ^$ %{ENV:base_url}/%{ENV:page}.php?subject=%{ENV:subject} [discardpath,last,noescape,qsappend,redirect]
|
|
28 | 33 |
|
29 | 34 |
## for internal URLs |
30 | 35 |
|
Also available in: Unified diff
bugfix: web/.phpPgAdmin/.htaccess: work around phpPgAdmin bug that causes page to be ignored when not logged in