Is there any straightforward way to change the case of any URL using mod_rewrite?
I thought this was pretty trivial... apparently not.
Examples:
http://example.com/id to http://example.com/ID
http://example.com/id/123 to http://example.com/ID/123
and so forth.
mod_rewrite has some internal functions you can use for a mapping. One of them is toupper that converts letters to uppercase:
toupper
RewriteMap uppercase int:toupper RewriteRule [a-z] %{uppercase:%{REQUEST_URI}} [L,R=301]
1.4m articles
1.4m replys
5 comments
57.0k users