mod_rewrite # sing problem

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/...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-17-2005
Sun
 
Posts: n/a
Default mod_rewrite # sing problem

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.

  #2 (permalink)  
Old 06-17-2005
HansH
 
Posts: n/a
Default Re: mod_rewrite # sing problem

"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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:44 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0