Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Examples Fail in RegexTest.exe Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
analoghell
Newbie
Newbie


Joined: 07 October 2008
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 07 October 2008 at 5:42am | IP Logged Quote analoghell

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 View analoghell's Profile Search for other posts by analoghell
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 07 October 2008 at 8:00am | IP Logged Quote Vyacheslav

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 View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
analoghell
Newbie
Newbie


Joined: 07 October 2008
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 07 October 2008 at 9:07am | IP Logged Quote analoghell

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 View analoghell's Profile Search for other posts by analoghell
 
analoghell
Newbie
Newbie


Joined: 07 October 2008
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 07 October 2008 at 12:37pm | IP Logged Quote analoghell

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 View analoghell's Profile Search for other posts by analoghell
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 08 October 2008 at 3:38am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
analoghell
Newbie
Newbie


Joined: 07 October 2008
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 09 October 2008 at 4:35am | IP Logged Quote analoghell

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 View analoghell's Profile Search for other posts by analoghell
 
analoghell
Newbie
Newbie


Joined: 07 October 2008
Location: United Kingdom
Online Status: Offline
Posts: 5
Posted: 10 October 2008 at 7:05am | IP Logged Quote analoghell

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 View analoghell's Profile Search for other posts by analoghell
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 13 October 2008 at 2:48am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum