sharingsunshine
asked on
Rewrite URL With Encoded Characters
I need to redirect urls from a Centos 6 server with the & encoded as & Here are some examples:
I only want them to go to the non encoded equivalent such as this.
RewriteRule ^index\.php\?controller=cm s&id_c ms=([0-9]+ )$ /index.php?controller=cms& id_cms=$1 [R=301,L]
However, this doesn't work so please tell me what I need to do.
Thanks,
index.php?controller=cms&id_cms=83
index.php?controller=cms&id_cms=60
index.php?controller=cms&id_cms=352
I only want them to go to the non encoded equivalent such as this.
RewriteRule ^index\.php\?controller=cm
However, this doesn't work so please tell me what I need to do.
Thanks,
ASKER
I think you might be correct but I don't know how to do a rewritemap so can you take my url and provide the code I need to make it work?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What server-side language is your application using?
ASKER
php
ASKER
I agree I will go back to the application to change the url's.
Internal Function
MapType: int, MapSource: Internal Apache function
Here, the source is an internal Apache function. Module authors can provide additional internal functions by registering them with the ap_register_rewrite_mapfun
toupper:
Converts the key to all upper case.
tolower:
Converts the key to all lower case.
escape:
Translates special characters in the key to hex-encodings.
unescape:
Translates hex-encodings in the key back to special characters.
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriteflags