This is a discussion on mod_rewrite # sing problem within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, I am using mod_rewrite with apache 2. bascially I want to convert. »localhost/app/2.html with »localhost/app/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I am using mod_rewrite with apache 2. bascially I want to convert. »localhost/app/2.html with »localhost/app/p.php?id=2#2 Here is the rule I have in httpd.conf file. <Location /app/> rewriteRule ^(.*)([0-9]+).html$ p.php?id=$2\#$2 [L,R] </Location> this changes the URL, but encodes # symbol with %23 character. how will i preserv # character during URL redirect. |
|
|||
|
"Sun" <sfgroups@gmail.com> schreef in bericht
news:1118978920.851728.94810@g47g2000cwa.googlegro ups.com... > I am using mod_rewrite with apache 2. bascially I want to convert. > »localhost/app/2.html with »localhost/app/p.php?id=2#2 > Here is the rule I have in httpd.conf file. > <Location /app/> > rewriteRule ^(.*)([0-9]+).html$ p.php?id=$2\#$2 [L,R] > </Location> > this changes the URL, but encodes # symbol with %23 character. Try rewriteRule ^(.*)([0-9]+).html$ p.php?id=$2\#$2 [L,R,NE] However, the %23 should not bother you(r script). The script should be aware of so-called URLencoding and decode it while parsing the query-string as name-value pairs. HansH |