Project

General

Profile

« Previous | Next » 

Revision 8485

web/**/.htaccess: When there is no external redirect for the directory without the trailing /, instead auto-add the trailing / to ensure mod_autoindex relative links work properly. This must be done manually because the top-level .htaccess will not auto-add the trailing / if the dir has an .htaccess file (to allow the custom external redirects). There are actually only two .htaccess files that this applies to (web/.phpPgAdmin/.htaccess, .phpMyAdmin/.htaccess), indicating that dirs which have any kind of virtual paths (redirects) almost always have a "root" redirect when there is no specific subpath. This root redirect is intended to link to the datasource's own index of its available resources, e.g. the list of tables for a database source.

View differences:

web/.phpPgAdmin/.htaccess
9 9
RewriteRule ^\[(.*)\]/([^/]*)/(.+?)/?$                         http://$1/redirect.php?server=$2&database=$3&subject=database                            [discardpath,noescape,last,redirect,qsappend]
10 10
RewriteRule ^\[(.*)\]/(.+?)/?$                                 http://$1/redirect.php?server=$2&subject=server                                          [discardpath,noescape,last,redirect,qsappend]
11 11
RewriteRule ^\[(.*)\]/?$                                       http://$1/redirect.php?subject=root                                                      [discardpath,noescape,last,redirect,qsappend]
12

  
13
# auto-add trailing / (dir without trailing / is absolute filesystem path)
14
RewriteCond %{ENV:innermost_dir} =phpPgAdmin
15
RewriteRule ^/ %{REQUEST_URI}/ [discardpath,noescape,last,redirect,qsappend]
web/.phpMyAdmin/.htaccess
7 7
RewriteRule ^\[(.*)\]/([^/]*)/(.+?)/?$         http://$1/?db=$2&table=$3&target=tbl_structure.php           [discardpath,noescape,last,redirect,qsappend]
8 8
RewriteRule ^\[(.*)\]/(.+?)/?$                 http://$1/?db=$2&target=db_structure.php                     [discardpath,noescape,last,redirect,qsappend]
9 9
RewriteRule ^\[(.*)\]/?$                       http://$1/?target=server_databases.php                       [discardpath,noescape,last,redirect,qsappend]
10

  
11
# auto-add trailing / (dir without trailing / is absolute filesystem path)
12
RewriteCond %{ENV:innermost_dir} =phpMyAdmin
13
RewriteRule ^/ %{REQUEST_URI}/ [discardpath,noescape,last,redirect,qsappend]

Also available in: Unified diff