Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rewrite question

Status
Not open for further replies.

jgiri

Programmer
Joined
May 9, 2010
Messages
6
Location
US
Hello,

I am using following rewrite rule:
RewriteRule ^(domain)/?([a-zA-Z0-9_]*/?$ /new.php?state=$1&kwt=%3 [nc,L]

this is working perfect, if somebody visits /DoMain it redirects to /new.php?state=DoMain( not case sensitive ) I would like to know if there is a way to make redirect url always lower case ? like such:
^(doMain)/?([a-zA-Z0-9_]*/?$ /new.php?state=domain

 
You will need to define a rewritemap which leverages the "int:tolower" function and call it within the rewriterule. The syntax below hasn't been tested and may need a little tweak.

RewriteMap lowercase int:tolower

RewriteRule ^(domain)/?([a-zA-Z0-9_]*/?$ /new.php?state=${lowercase:$1&kwt=%3} [nc,L]

Mike

WarpZero Technologies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top