httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dharana <>
Subject [users@httpd] Question about mod_rewrite and mod_mime
Date Sun, 07 Aug 2005 11:16:54 GMT
I've a rewrite rule like this:

         RewriteRule ^/_d([0-9]+)/(.*)/([^/]+)$ /storage/$2 \ 

which transforms urls like this:

[1url]	http://someaddress/_d1123098344/celements_353s/2047/file/SkinPack01.rar

into urls like this:

[2url]	http://someaddress/storage/celements_353s/2047/file

I also have two problems:

If I request the "2url" directly it gets sent with Content-Type: 

But if I access "1url" it gets sent as text/plain (which is DefaultType in the 

First question would be: why is this happening? I expected the file to be 
returned with content-type: application/octet-stream when hitting the rewrite rule.

I would like apache to use the original request uri to determine the 
content-type header sent later on (because the file is stored on disk without 

Second question would be: Is it possible to do this?

I didn't saw anything more than the T= flag in mod_rewrite.

Thank you,

I'm using Apache 2.0.54.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message