Isapi rewrite decodes %26 to ampersand
			7 posts
			 • Page 1 of 1
		
	
Isapi rewrite decodes %26 to ampersand
Hi support,
I have a problem when %26 is found in a url
I have this rule:
RewriteRule ^/search/(.+)$ /search.aspx?$1 [NU, NC, L, QSA]
I works unless I have a %26 in $1
For example from this address:
/search/qs=b%20%26%20d?mets=b%20%26%20d
it genetates
/search.aspx?qs=b%20&%20d&mets=b%20%26%d
For querystring %26 is mantained while for $1 is transformed from %26 to &
Is there any way to leave $1 not decoded?
			
		I have a problem when %26 is found in a url
I have this rule:
RewriteRule ^/search/(.+)$ /search.aspx?$1 [NU, NC, L, QSA]
I works unless I have a %26 in $1
For example from this address:
/search/qs=b%20%26%20d?mets=b%20%26%20d
it genetates
/search.aspx?qs=b%20&%20d&mets=b%20%26%d
For querystring %26 is mantained while for $1 is transformed from %26 to &
Is there any way to leave $1 not decoded?
Re: Isapi rewrite decodes %26 to ampersand
Hello.
Try to add [O] flag:
RewriteRule ^/search/(.+)$ /search.aspx?$1 [O, NC, L, QSA]
			
		Try to add [O] flag:
RewriteRule ^/search/(.+)$ /search.aspx?$1 [O, NC, L, QSA]
Re: Isapi rewrite decodes %26 to ampersand
Hello
I cannot add n(O)rmalization flag as it removes all parameters and encode the char "?".
so doing so I get /search.aspx?qs=b%20%26%20d%3Fmets=b%20%26%d
where b%20%26%20d%3Fmets=b%20%26%d is the value only for qs parameter
			
		I cannot add n(O)rmalization flag as it removes all parameters and encode the char "?".
so doing so I get /search.aspx?qs=b%20%26%20d%3Fmets=b%20%26%d
where b%20%26%20d%3Fmets=b%20%26%d is the value only for qs parameter
Re: Isapi rewrite decodes %26 to ampersand
Hello from 2024.  I have exactly the same problem.  Was a solution ever found?
			
		
			7 posts
			 • Page 1 of 1
		
	
Who is online
Users browsing this forum: No registered users and 3 guests