Changes with Apache 1.2.1
-
+
+ *) Update mod_rewrite from 3.0.5 to 3.0.6. New ruleflag
+ QSA=query_string_append. Also fixed a nasty bug in per-dir context:
+ when a URL http://... was used in concunction with a special
+ redirect flag, e.g. R=permanent, the permanent status was lost.
+ [Ronald Tschalaer <Ronald.Tschalaer@psi.ch>, Ralf S. Engelschall]
+
*) If an object has multiple variants that are otherwise equal Apache
would prefer the last listed variant rather than the first.
[Paul Sutton] PR#94
** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___|
** |_____|
**
-** URL Rewriting Module, Version 3.0.5 (16-Apr-1997)
+** URL Rewriting Module, Version 3.0.6 (15-Jun-1997)
**
** This module uses a rule-based rewriting engine (based on a
** regular-expression parser) to rewrite requested URLs on the fly.
|| strcasecmp(key, "G") == 0 ) {
cfg->flags |= RULEFLAG_GONE;
}
+ else if ( strcasecmp(key, "qsappend") == 0
+ || strcasecmp(key, "QSA") == 0 ) {
+ cfg->flags |= RULEFLAG_QSAPPEND;
+ }
else {
return pstrcat(p, "RewriteRule: unknown flag '", key, "'\n", NULL);
}
}
rewritelog(r, 2, "[per-dir %s] redirect %s -> %s", perdir, r->filename, newuri);
r->filename = pstrdup(r->pool, newuri);
+ r->status = p->forced_responsecode;
return 1;
}
reduce_uri(r);
/* split out on-the-fly generated QUERY_STRING '....?xxxxx&xxxx...' */
- splitout_queryargs(r);
+ splitout_queryargs(r, p->flags & RULEFLAG_QSAPPEND);
/* if a MIME-type should be later forced for this URL, then remember this */
if (p->forced_mimetype != NULL) {
**
*/
-static void splitout_queryargs(request_rec *r)
+static void splitout_queryargs(request_rec *r, int qsappend)
{
char *q;
char *olduri;
if (q != NULL) {
olduri = pstrdup(r->pool, r->filename);
*q++ = '\0';
- r->args = pstrcat(r->pool, q, "&", r->args, NULL);
+ if (qsappend)
+ r->args = pstrcat(r->pool, q, "&", r->args, NULL);
+ else
+ r->args = pstrdup(r->pool, q);
if (r->args[strlen(r->args)-1] == '&')
r->args[strlen(r->args)-1] = '\0';
rewritelog(r, 3, "split uri=%s -> uri=%s, args=%s", olduri, r->filename, r->args);
** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___|
** |_____|
**
-** URL Rewriting Module, Version 3.0.5 (16-Apr-1997)
+** URL Rewriting Module, Version 3.0.6 (15-Jun-1997)
**
** This module uses a rule-based rewriting engine (based on a
** regular-expression parser) to rewrite requested URLs on the fly.
#define RULEFLAG_PASSTHROUGH 1<<8
#define RULEFLAG_FORBIDDEN 1<<9
#define RULEFLAG_GONE 1<<10
+#define RULEFLAG_QSAPPEND 1<<11
#define MAPTYPE_TXT 1<<0
#define MAPTYPE_DBM 1<<1
static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, char *perdir);
/* URI transformation function */
-static void splitout_queryargs(request_rec *r);
+static void splitout_queryargs(request_rec *r, int qsappend);
static void reduce_uri(request_rec *r);
static char *expand_tildepaths(request_rec *r, char *uri);
static void expand_map_lookups(request_rec *r, char *uri, int uri_len);