Project

General

Profile

« Previous | Next » 

Revision 8000

web/main/.htaccess: translate dotpaths to /-paths: Translate all .-separated components in the path to / instead of just those that exist in the filesystem. This allows per-source rules to match just a / for the path-element separator instead of sometimes / and other times . (depending on whether that portion of the dotpath had been translated). Support [] escapes that preserve any . they surround, e.g. a.[b.c] -> a/b.c . (Supporting []-escapes requires that the /-path be "sealed" by appending a / , to prevent the . -> / translation rule from reinterpreting a newly-unescaped [] sequence as a dotpath. This also requires that the translation rule ignore anything before the last /, because it could have been []-unescaped by a previous round of mod_rewrite, e.g. in another dir. All the per-source rules need to be retrofitted to support the new trailing / .) Note also the discardpath flag (http://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_dpi) on all RewriteRules that perform a replacement on the input string (i.e. that have a pattern other than ^.*$). This flag is needed to avoid infinite loops, because otherwise, a critical bug in mod_rewrite causes it to reappend the filename portion of the input string (PATH_INFO) to the result, causing it to be present twice, e.g. a/b -> a/b/b (https://issues.apache.org/bugzilla/show_bug.cgi?id=38642).

View differences:

.htaccess
1
RedirectMatch ^/\.phpMyAdmin/\[(.*)\]/([^/.]*)[/.]([^/.]*)[/.](.+)$ $1/?db=$2\&table=$3\&column=$4\&target=tbl_structure.php
2
RedirectMatch ^/\.phpMyAdmin/\[(.*)\]/([^/.]*)[/.](.+)$             $1/?db=$2\&table=$3\&target=tbl_structure.php
3
RedirectMatch ^/\.phpMyAdmin/\[(.*)\]/(.+)$                         $1/?db=$2\&target=db_structure.php
4
RedirectMatch ^/\.phpMyAdmin/\[(.*)\]/$                             $1/?target=server_databases.php
1
RedirectMatch ^/\.phpMyAdmin/\[(.*)\]/([^/]*)/([^/]*)/(.+)/$ $1/?db=$2\&table=$3\&column=$4\&target=tbl_structure.php
2
RedirectMatch ^/\.phpMyAdmin/\[(.*)\]/([^/]*)/(.+)/$         $1/?db=$2\&table=$3\&target=tbl_structure.php
3
RedirectMatch ^/\.phpMyAdmin/\[(.*)\]/(.+)/$                 $1/?db=$2\&target=db_structure.php
4
RedirectMatch ^/\.phpMyAdmin/\[(.*)\]/$                      $1/?target=server_databases.php

Also available in: Unified diff