mod_rewrite and replacing characters
Posted: Sat Nov 19, 2005 4:42 pm
Hi,
I have following rule:
This does following mapping:
suchmaschine/steel.html
=> /modules/mod_search.php?action=startSearch&suche[searchstring]=steel&suche[results]=10&suche[bundesland]=18&modus=all
I would like to extend my RegExp to replace underscore _ to %20 (space) like this:
suchmaschine/steel_case.html
=> /modules/mod_search.php?action=startSearch&suche[searchstring]=steel%20case&suche[results]=10&suche[bundesland]=18&modus=all
How to?
Thanks,
visionmaster
I have following rule:
Code: Select all
RewriteEngine On
RewriteRule ^suchmaschine/(.*)\.html
/modules/mod_search.php?action=startSearch&suche[searchstring]=$1&suche[results]=10&suche[bundesland]=18&modus=allsuchmaschine/steel.html
=> /modules/mod_search.php?action=startSearch&suche[searchstring]=steel&suche[results]=10&suche[bundesland]=18&modus=all
I would like to extend my RegExp to replace underscore _ to %20 (space) like this:
suchmaschine/steel_case.html
=> /modules/mod_search.php?action=startSearch&suche[searchstring]=steel%20case&suche[results]=10&suche[bundesland]=18&modus=all
How to?
Thanks,
visionmaster