[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

mod_rewrite rule to force filename (not including querystring) into lowercase

Posted on 2005-05-04
1
Medium Priority
?
298 Views
Last Modified: 2013-11-18
Hi,

I need a mod_rewrite rule to put all filenames and paths into lowercase i.e.

www.server.com/Path/FilenAme.htm

becomes

www.server.com/path/filename.htm

ok?
0
Comment
Question by:armeen
1 Comment
 
LVL 27

Accepted Solution

by:
caterham_www earned 2000 total points
ID: 13934157
-> works only in httpd.conf in main server config section or Virtualhost (=per server context), but is *not* possible in .htaccess files or <Directory>-Sections, because a RewriteMap is not allowed there:

RewriteEngine On
RewriteMap    lowercase    int:tolower
RewriteRule ^/(.*[A-Z]+.*) /${lowercase:$1} [R=301,L]

This will forca an external redirection. If it should be just an internal redirect, remove R=301 from the flag to => [L]
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question