httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dharana <dhar...@dharana.net>
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 \ 
[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


Mime
View raw message