You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by cristopher pierson ewing <ce...@u.washington.edu> on 2007/02/02 18:28:55 UTC

[users@httpd] RewriteRule shennanigans

Hi there.

I've got a set of rewrite rules designed to allow for search-engine 
freindly URLs.  An example rule looks like this:

RewriteRule ^(register|course)/([A-Z]{2,2}[0-9]{4,4}) $1.php?id=$2

This rule has been working for the past year or so in rewriting URLs like

http://my.server.com/register/MJ0701  into

http://my.server.com/register.php?id=MJ0701

I recently accidentally wiped out the .htaccess file on my test server 
that held these rules, and rewrote them with rules copied from my 
production server .htaccess file.  I restarted apache, and suddenly the 
rule failed to work.

I turns out, after turning on rewrite logging, that before my rule could 
be applied, some apache internal process was rewriting my incoming url

http://my.server.com/register/MJ0701 into
http://my.server.com/register.php/MJ0701

using a step called 'add path-info postfix'.

My question is this.  When did this start happening, and is there some way 
to shut it off?  I am leery of processes which rewrite my urls without my 
consent, and would like to control this myself.  I can (and have) 
rewritten the rules to account for the added postfixes, but I don't like 
the need to do that, and I didn't use to have to.  I think there was 
another directive in my .htaccess that did it, but I can't remember what 
it was.

Thanks for any suggestions you all might have.

Cris

********************************
Cris Ewing
CME and Telehealth Web Services
Department of Radiology Web Services
University of Washington
School of Medicine
Work Phone: (206) 685-9116
Home Phone: (206) 365-3413
E-mail: cewing@u.washington.edu
*******************************


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org