943,619 Members | Top Members by Rank

Oct 2nd, 2005
0

mod_rewrite lowercase filenames

Expand Post »
Hi
Trying to use mod_rewrite to convert all filenames in a subdirectory to lowercase (they may also include other characters, or numbers). Also I want to make sure that they 301 for search engine goodness.
Witness me flail and fail:

Have tried:
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteRule ^thisdirectory/([0-9]+)/^[\/]*(.*)$ /thisdirectory/([0-9]+)/${lowercase1} [R,L,PT]

and variations.
the (already rewritten with other rules) url format it is working with is:
http://www.my.com/thisdirectory/1214...onvert-me.html

Cluestick, anyone?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bsmith is offline Offline
9 posts
since Sep 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Servers and Apache Forum Timeline: Help with Sendmail
Next Thread in Linux Servers and Apache Forum Timeline: Redirecting a Directory or page...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC