Solved

htaccess change url to lowercase using RewriteMap

Posted on 2010-08-18
2
1,376 Views
Last Modified: 2012-05-10
I would like the below code to convert the new url to lowercase,

I have found some examples, but can't seem to get it to work.
http://balajin.net/blog/archives/2005/10/07/using_mod_rewrite_to_convert_u.html
RewriteCond %{QUERY_STRING} ^param=([a-zA-Z0-9_-]*)$
RewriteRule ^index\.php$ /ff/%1? [R,L]

Open in new window

0
Comment
Question by:thydzik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Assisted Solution

by:geoffkendal
geoffkendal earned 250 total points
ID: 33464279
i found this...

rewriteEngine on
rewriteMap lowercase int:tolower
rewriteCond $1 [A-Z]
rewriteRule ^/(.*)$ /${lowercase:$1} [R=301,L]
0
 
LVL 30

Accepted Solution

by:
Brad Howe earned 250 total points
ID: 33471131
Hi,
RewriteEngine On
RewriteMap  lc int:tolower
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]

Note that the RewriteMap directive can only be used in the httpd.conf and not in a .htaccess.
Cheers,
Hades666
 
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

626 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