[mod_rewrite] Change physical path too

personal/stbuehler/wip
Thomas Porzelt 13 years ago
parent e108be188d
commit 2799a9ab3e
  1. 8
      src/modules/mod_rewrite.c

@ -340,9 +340,17 @@ static liHandlerResult rewrite(liVRequest *vr, gpointer param, gpointer *context
);
}
/* change request path */
g_string_truncate(vr->request.uri.path, 0);
g_string_append_len(vr->request.uri.path, GSTR_LEN(vr->wrk->tmp_str));
/* change physical path */
if (vr->physical.doc_root->len) {
g_string_truncate(vr->physical.path, vr->physical.doc_root->len);
g_string_append_len(vr->physical.path, GSTR_LEN(vr->wrk->tmp_str));
}
/* change request query */
if (rule->has_querystring) {
g_string_truncate(vr->request.uri.query, 0);
g_string_append_len(vr->request.uri.query, GSTR_LEN((GString*)g_ptr_array_index(rpd->tmp_strings, vr->wrk->ndx)));

Loading…
Cancel
Save