| Author |
|
analoghell Newbie

Joined: 07 October 2008 Location: United Kingdom
Online Status: Offline Posts: 5
|
| Posted: 07 October 2008 at 5:42am | IP Logged
|
|
|
Hello,
Using the supplised RegexTest.exe to test expressions the basic SES examples fails.
If i use:
RewriteRule ^(.*?\.asp)/([^/]*)/([^/]*)(/.+)? $1$4?$2=$3 [NC,LP,QSA]
With test string:
/foo.asp/a/A/b/B/c/C
The result is:
/foo.asp?c=C?a=A?b=B
So getting ? instead of &. Weird.
Should be:
/foo.asp?c=C&a=A&b=B
This is taken from here:
http://www.helicontech.com/isapi_rewrite/doc/examples.htm#SEF
Is the RegexTest.exe app wrong or the rule?? Am I missing something?
ac
|
| Back to Top |
|
| |
Vyacheslav Moderator Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 673
|
| Posted: 07 October 2008 at 8:00am | IP Logged
|
|
|
Hi,
Thank you for your message. Yes, it is a bug of RegexTest. ISAPI_Rewrite processes this rule correctly.
__________________ Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
|
| Back to Top |
|
| |
analoghell Newbie

Joined: 07 October 2008 Location: United Kingdom
Online Status: Offline Posts: 5
|
| Posted: 07 October 2008 at 9:07am | IP Logged
|
|
|
Thanks for confirming that. Do you have an updated
version?
How can I develop rules for ISAPI Rewrite without being
able to test them correctly??
Regards,
ac
Vyacheslav wrote:
Hi,
Thank you for your message. Yes, it is a bug of
RegexTest. ISAPI_Rewrite processes this rule
correctly. |
|
|
|
| Back to Top |
|
| |
analoghell Newbie

Joined: 07 October 2008 Location: United Kingdom
Online Status: Offline Posts: 5
|
| Posted: 07 October 2008 at 12:37pm | IP Logged
|
|
|
Hi,
Given that it's not working, maybe you could help with an expression:
I need:
/keyword/value/a/A/b/B/c/C etc
To produce the result
/index.aspx?keyword=value&a=A&b=B&c=C etc
Where keyword is one of only two names (not values). ie
/fish/value/a/A/b/B/c/C
or
/dog/value/a/A/b/B/c/C
No other keyword name (not value) should produce a rewrite.
I'm struggling to get meaningfull results in RegexTest.
TAI,
ac
analoghell wrote:
Thanks for confirming that. Do you have an updated
version?
How can I develop rules for ISAPI Rewrite without being
able to test them correctly??
Regards,
ac
Vyacheslav wrote:
Hi,
Thank you for your message. Yes, it is a bug of
RegexTest. ISAPI_Rewrite processes this rule
correctly. |
|
|
|
|
|
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4837
|
| Posted: 08 October 2008 at 3:38am | IP Logged
|
|
|
Please try to apply the following config:
RewriteBase /
RewriteRule ^(fish|dog)/([^/]+)(/.*)$ $1=$2$3 [NC]
RewriteRule ^((?:fish|dog)=[^/]+)/([^/]*)/([^/]*)(/.+)? $1$4?$2=$3 [NC,LP,QSA]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
analoghell Newbie

Joined: 07 October 2008 Location: United Kingdom
Online Status: Offline Posts: 5
|
| Posted: 09 October 2008 at 4:35am | IP Logged
|
|
|
Hello,
this doesn't work. It doesn't pass to a specific file.
With:
/page/test/a/1/b/2/c/3
The result is:
/page=test?c=3&b=2&a=1
When what we need is:
/index.asp?page=test&c=3&b=2&a=1
Please advise.
Thanks,
ac
|
| Back to Top |
|
| |
analoghell Newbie

Joined: 07 October 2008 Location: United Kingdom
Online Status: Offline Posts: 5
|
| Posted: 10 October 2008 at 7:05am | IP Logged
|
|
|
Bump!
Please advise. This does not work. See above.
Thanks.
Anton wrote:
Please try to apply the following config:
RewriteBase /
RewriteRule ^(fish|dog)/([^/]+)(/.*)$ $1=$2$3 [NC]
RewriteRule ^((?:fish|dog)=[^/]+)/([^/]*)/([^/]*)(/.+)? $1$4?$2=$3 [NC,LP,QSA] |
|
|
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4837
|
| Posted: 13 October 2008 at 2:48am | IP Logged
|
|
|
Please try to apply the following config:
RewriteBase /
RewriteRule ^(fish|dog.+)$ index.asp/$1 [NC]
RewriteRule ^(index\.asp)/([^/]*)/([^/]*)(/.+)? $1$4?$2=$3 [NC,LP,QSA]
__________________ Regards,
Anton
|
| Back to Top |
|
| |