How to match "?" in the condition?
2 posts
• Page 1 of 1
How to match "?" in the condition?
Hello,
now I have switched from ISAPI_Rewrite 2.x to 3.0. I have used the "SyntaxConverter" to convert my old 2.x-rule:
RewriteRule (.*/on-demand)/(.+)\?(.+) $1/on-demand.asp?$3 [I,L]
to the new 3.x-format:
RewriteRule ^(.*/on-demand)/(.+)\?(.+)$ $1/on-demand.asp?$3 [NC]
The request-URL is:
/on-demand/stream20140125-2030.pls?user=Michael
and it should be rewritten to:
/on-demand/on-demand.asp?user=Michael
But the new rule doesn't match, also not in the RegexTest.exe tool. The problem seems to be the \? in the condition, because if I chance the \? for example to \! and modify the request URL to "...pls!user=...", it is working well.
Can anybody help me?
now I have switched from ISAPI_Rewrite 2.x to 3.0. I have used the "SyntaxConverter" to convert my old 2.x-rule:
RewriteRule (.*/on-demand)/(.+)\?(.+) $1/on-demand.asp?$3 [I,L]
to the new 3.x-format:
RewriteRule ^(.*/on-demand)/(.+)\?(.+)$ $1/on-demand.asp?$3 [NC]
The request-URL is:
/on-demand/stream20140125-2030.pls?user=Michael
and it should be rewritten to:
/on-demand/on-demand.asp?user=Michael
But the new rule doesn't match, also not in the RegexTest.exe tool. The problem seems to be the \? in the condition, because if I chance the \? for example to \! and modify the request URL to "...pls!user=...", it is working well.
Can anybody help me?
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: How to match "?" in the condition?
Hello,
There're several issues I can spot right away.
Regards
Andrew
There're several issues I can spot right away.
- Code: Select all
RewriteEngine on
RewriteBase /
## /on-demand/stream20140125-2030.pls?user=Michael -->/on-demand/on-demand.asp?user=Michael
RewriteRule ^on-demand/.+ /on-demand/on-demand.asp [NC,QSA,L]
Regards
Andrew
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests