httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36590] mod_rewrite type|T force mime type option doesn't work
Date Sun, 07 Mar 2010 10:50:26 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=36590

quanxunzhen@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEW

--- Comment #7 from quanxunzhen@gmail.com 2010-03-07 10:50:23 UTC ---
This bug is also trouble me.

If I use the following rule:
RewriteCond %{REQUEST_URI} \.t$
RewriteRule ^(.*)\.t$ $1 [T=text/html]

The flag T will never work. But when I modify it to the following rule:
RewriteCond %{REQUEST_URI} \.t$
RewriteRule ^(.*)\.t$ $1
RewriteRule . - [T=text/html]

Then, the Content-Type in header is set properly.

But now, I need a more flexible rewrite rule that I can set the MIME-Type in
the request url, so I modify it again to:
RewriteCond %{REQUEST_URI} \.t$
RewriteRule ^([a-zA-Z]+/[a-zA-Z-]+)/(.*)\.t$ $2 [E=MIMETYPE:$1]
RewriteRule . - [T=%{ENV:MIMETYPE}]

But it doesn't work anymore.

According to your explanation above, the last rule should not lead to a
internal redirect because it changes nothing but the mimetype like the previous
one. But they behave quite differently!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message