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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to