You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by dharana <dh...@dharana.net> on 2005/08/07 13:16:54 UTC

[users@httpd] Question about mod_rewrite and mod_mime

I've a rewrite rule like this:

         RewriteRule ^/_d([0-9]+)/(.*)/([^/]+)$ /storage/$2 \ 
[L,T=application/octet-stream]



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:


PROBLEM 1
If I request the "2url" directly it gets sent with Content-Type: 
application/octet-stream

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

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.



PROBLEM 2
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 
extensions).

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.


-- 
dharana


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