Project

General

Profile

# Date Author Comment
11970 01/20/2014 11:33 AM Aaron Marcuse-Kubitza

moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).

8507 04/14/2013 09:19 PM Aaron Marcuse-Kubitza

web/**/.htaccess: RewriteRules: ensured flags are in alphabetical order

8450 04/11/2013 04:52 PM Aaron Marcuse-Kubitza

web/**/.htaccess: Use [qsappend] flag with all RewriteRules to ensure that the original query string is never lost

8448 04/11/2013 02:45 PM Aaron Marcuse-Kubitza

web/**/.htaccess: Removed preprocessing commands that need to run for every dir, because these are now inherited from the outermost .htaccess using InheritBefore. This allows the inner .htaccess files to focus just on the fallback rewrites, without needing lots of boilerplate code (except for the obligatory RewriteEngine/RewriteOptions/SetEnvIf preamble).

8446 04/11/2013 02:07 PM Aaron Marcuse-Kubitza

web/**/.htaccess: Use InheritBefore RewriteOption so that the outermost dir's rules are always run first. This is necessary so that all the HTTP_HOST and dotpath handlers, etc. are applied before any fallback handlers, without needing to copy and paste each rule into every .htaccess file. (Note that the InheritBefore RewriteOption is only available in Apache 2.4.) The outermost .htaccess file, however, must not use InheritBefore because this would inherit rules from the global Apache config, which normally should not be run and which cause an infinite redirect loop.

8445 04/11/2013 01:56 PM Aaron Marcuse-Kubitza

web/**/.htaccess: fallback rules which should not be inherited by subdirs: Filter using a RewriteCond on %{ENV:innermost_dir} so that the rule is only run if the innermost dir was this dir. (This is needed when using InheritBefore.)

8444 04/11/2013 01:36 PM Aaron Marcuse-Kubitza

web/**/.htaccess: Added SetEnvIf directives to set the $innermost_dir env var, which is used by InheritBefore RewriteRule inheritance. You can easily populate the current dir name in jEdit by right-clicking the buffer tab and selecting Insert File Path (which requires the BufferTabs plugin), and then picking out the dir right before the .htaccess. If multiple dirs in the dir path have the same name (e.g. a/b/a/), add a distinguishing prefix to the inner dirs (this is rare).

8408 04/10/2013 09:40 AM Aaron Marcuse-Kubitza

inputs/SALVIAS/.htaccess: Removed test RedirectMatch directive

8407 04/10/2013 09:38 AM Aaron Marcuse-Kubitza

web/**/.htaccess: RewriteOptions: Redirect dir paths without the trailing / to the datasource's homepage, and let dir paths with the trailing / point to the directory index. This is the opposite of the way it was before, and is more intuitive because the trailing / indicates a directory listing, while the trailing / would generally be omitted when linking to the datasource itself.

8406 04/10/2013 07:49 AM Aaron Marcuse-Kubitza

web/**/.htaccess: handle DirectoryIndex subrequests, which append "index" to the dir

8405 04/10/2013 06:15 AM Aaron Marcuse-Kubitza

web/**/.htaccess: RewriteOptions: Removed inherit because if the destination is not found in the current dir, a 404 should be returned instead of trying to invoke the parent dir's fallback handler (which applies only to paths in the parent dir). Ideally, we would use InheritBefore to get the subdomain preprocessing, etc., but the parent dir's fallback handler would still need to be turned off somehow when the rule was being run by a subdir.

8403 04/10/2013 05:15 AM Aaron Marcuse-Kubitza

web/**/.htaccess: RewriteOptions: Added AllowNoSlash (available in Apache 2.4) so dir paths without the trailing / can be parsed by mod_rewrite

8400 04/10/2013 03:29 AM Aaron Marcuse-Kubitza

web/**/.htaccess: parse dotpath in the query string: Use just dotpath instead of dotpath.php because the extension is added automatically by MultiViews

8399 04/10/2013 03:28 AM Aaron Marcuse-Kubitza

web/**/.htaccess: parse dotpath in the query string: Remove any index.* suffix, which is added by MultiViews in Apache 2.4

8385 04/09/2013 09:48 PM Aaron Marcuse-Kubitza

web/: datasources indexed in VegPath: Added .htaccess files to corresponding inputs/ dir so the short URLs can also be accessed via VegBIEN's own dir for the datasource

8378 04/09/2013 04:13 PM Aaron Marcuse-Kubitza

web/**/.htaccess: Removed "handle DirectoryIndex" rule, which does not appear to be needed with the new dotpath format

8375 04/09/2013 03:42 PM Aaron Marcuse-Kubitza

web/**/.htaccess: Restrict redirection only of fully-existing paths, rather than of any path whose subdir exists, in order to avoid having to hardcode the absolute path to the directory containing the .htaccess file. This more restrictive approach still works because if the subdir exists and contains an .htaccess file, this (outer) .htaccess file's RewriteRules will be ignored completely until the inner .htaccess file's rules have been run, so that any subdir redirects will happen first. This "hole-punch" effect causes an existing filesystem path to always take priority over a virtual path (i.e. a redirect) defined in an outer .htaccess file.

8371 04/09/2013 02:36 PM Aaron Marcuse-Kubitza

Renamed www/ back to web/

8368 04/09/2013 02:24 PM Aaron Marcuse-Kubitza

web/: Moved auxiliary files into the main/ subdir in preparation for having just the web/ dir. Renamed web/ to www/ so it can be replaced with web/main/.

8363 04/09/2013 01:06 PM Aaron Marcuse-Kubitza

web/main/**/.htaccess: Support dotpaths in the query string instead of in the path, so that non-dotpath paths don't need to be suffixed with / to prevent their filenames from being interpreted as dotpaths. Putting dotpaths in the query string still requires only one character between the host and the path, but it's ? instead of / . ? is in many ways more natural, because the dotpath is a non-filesystem string to be parsed rather than something that's already a filesystem path. This change also avoids the need to strip trailing /s in many RewriteRules, because the dotpath mechanism is no longer appending them.

8060 03/16/2013 05:45 AM Aaron Marcuse-Kubitza

web/main/**/.htaccess: Removed RewriteCond -l tests because one of the -d or -f tests will always also pass, making the -l test unnecessary

8049 03/16/2013 02:35 AM Aaron Marcuse-Kubitza

web/main/SALVIAS/.htaccess: Forward to new dd/ subdir

8045 03/16/2013 01:51 AM Aaron Marcuse-Kubitza

web/main/**/.htaccess: don't redirect subdir paths: Fixed bug where can only match non-empty string, because otherwise the rule would match this directory, which should still have its redirects processed

8032 03/15/2013 11:30 PM Aaron Marcuse-Kubitza

web/main/**/.htaccess: Use RewriteRule instead of RedirectMatch to handle incremental redirects internally instead of issuing a (much slower) redirect to the web browser each time. This also handles edge cases better, as [last] RewriteRules can be used to control when to forward control to a subdir, and doesn't require prepending the path to the dir the .htaccess file is in. Note that this requires all gateway dirs (dirs with subdirs) to contain special RewriteRules to avoid redirecting subdir paths and handle DirectoryIndex; see web/main/DwC/.htaccess. Also note that the regexp of a catch-all RewriteRule must exactly follow the template for internal or external redirects; see web/main/SALVIAS/db/.htaccess for internal redirects and web/main/DwC/history/.htaccess for external redirects.

8021 03/15/2013 02:46 PM Aaron Marcuse-Kubitza

web/main/**/.htaccess: Use RewriteEngine, inheriting the web/main/.htaccess rules, in order to translate dotpaths that follow /-paths to existing dirs

8009 03/15/2013 12:02 PM Aaron Marcuse-Kubitza

web/main/SALVIAS/.htaccess: RedirectMatch for below top-level: Use /(.*?)/?$ suffix for consistency with other sources' RedirectMatch patterns

8004 03/15/2013 11:28 AM Aaron Marcuse-Kubitza

web/main/SALVIAS/: Moved db/ and users/ actions to their corresponding subdirs. The rules will still be run in the appropriate order, because if a .htaccess exists in a subdir, it will be used in preference to the .htaccess in the parent dir.

8000 03/15/2013 08:04 AM Aaron Marcuse-Kubitza

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).

7999 03/15/2013 03:09 AM Aaron Marcuse-Kubitza

web/main/nimoy/: Moved to web/main/servers/ so it can be grouped with other resources that are servers

7993 03/13/2013 11:09 PM Aaron Marcuse-Kubitza

web/main/DwC,SALVIAS,TCS,VegX: Added .htaccess redirects and dot-path-matching empty dirs, which will replace the index.php redirects with a simpler syntax (http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect)