httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
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 changed:

           What    |Removed                     |Added
             Status|REOPENED                    |NEW

--- Comment #7 from 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:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message