This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Pages without last slash not working
Author
Message |
Dutch_guy
Newbie


Joined: 19 February 2009
Location: Netherlands
Posts: 11
Posted: 15 November 2010 at 5:01am

Since I added this rule:

RewriteRule /(?!(?:ALL))([^/.]+) /searchdetail.asp?organisatie_id=$1 [I,L]

to be able to use these url's:

I can not request url's like these: http://www.mydomain.nl/admin

I get an error:Type mismatch: 'CLng' when I don't add a trailing slash.

So this url does work: http://www.mydomain.nl/admin/

Any idea's how to get it to work without the trailing slash again ?

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 15 November 2010 at 7:10am

Please try to fix your rule as follows:

RewriteRule /(?!(?:ALL))([^/.]+?)/? /searchdetail.asp?organisatie_id=$1 [I,L]

__________________
Regards,
Anton
Back to Top
 
Dutch_guy
Newbie


Joined: 19 February 2009
Location: Netherlands
Posts: 11
Posted: 16 November 2010 at 2:26pm

Unfortunately the same error. Any other idea's ?
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 17 November 2010 at 3:44am

Could you please explain once again which requests work fine and which don't.
And how do you expect it to be processed.

__________________
Regards,
Anton
Back to Top
 
Dutch_guy
Newbie


Joined: 19 February 2009
Location: Netherlands
Posts: 11
Posted: 17 November 2010 at 3:51am

Let me give you the live examples:

This works: http://tegels.nl/5605 (We use these url's for Twitter)

But then this does not work:

http://www.tegels.nl/beheer_klanten

and this works:

http://www.tegels.nl/beheer_klanten/

Thank you for your help !

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 17 November 2010 at 4:11am

I'm sorry, but this doesn't look like the problem with ISAPI_Rewrite.
Your VB script doesn't accept specific URLs without slash; please check it on your side.

__________________
Regards,
Anton
Back to Top
 
Dutch_guy
Newbie


Joined: 19 February 2009
Location: Netherlands
Posts: 11
Posted: 17 November 2010 at 4:15am

But if I delete this line:

RewriteRule /(?!(?:ALL))([^/.]+) /searchdetail.asp?organisatie_id=$1 [I,L]

I can access those pages with or without slash.

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 17 November 2010 at 4:57am

Let me explain that requests with trailing slash don't even match your initial rule:

RewriteRule /(?!(?:ALL))([^/.]+) /searchdetail.asp?organisatie_id=$1 [I,L]

And one more question: how do requests like this http://www.tegels.nl/beheer_klanten work when you remove the rule if it's not the real link?

__________________
Regards,
Anton
Back to Top
 
Dutch_guy
Newbie


Joined: 19 February 2009
Location: Netherlands
Posts: 11
Posted: 17 November 2010 at 5:07am

The http://www.tegels.nl/beheer_klanten link is a real subdirectory, which in fact is this page: http://www.tegels.nl/beheer_klanten/index.asp

 

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 17 November 2010 at 7:17am

"The http://www.tegels.nl/beheer_klanten link is a real subdirectory"
- then why are you willing to rewrite it as /searchdetail.asp?organisatie_id=beheer_klanten ?
You'd get the same VB script error if /beheer_klanten/ matched the rule
(you may try http://www.tegels.nl/searchdetail.asp?organisatie_id=beheer_klanten/)

__________________
Regards,
Anton
Back to Top
 
Dutch_guy
Newbie


Joined: 19 February 2009
Location: Netherlands
Posts: 11
Posted: 17 November 2010 at 7:20pm

No, I don't want to rewrite http://www.tegels.nl/beheer_klanten

I only want to rewrite http://www.tegels.nl/searchdetail.asp?organisatie_id=1022 to: http://tegels.nl/1022

So maybe i have to do something with a conditional statement. That only url's with "searchdetail.asp?organisatie_id=" are rewritten with this rule: RewriteRule /(?!(?:ALL))([^/.]+) /searchdetail.asp?organisatie_id=$1 [I,L]

So that othe url's stay unaffected ?

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 18 November 2010 at 2:52am

Ok, I guess I see now.
Please try to have it like this:

RewriteRule /(\d+)/? /searchdetail.asp\?organisatie_id=$1 [I,L]

__________________
Regards,
Anton
Back to Top
 
Dutch_guy
Newbie


Joined: 19 February 2009
Location: Netherlands
Posts: 11
Posted: 18 November 2010 at 2:28pm

You are the man !

It works now !

Thank you for your help and patience !

Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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 cannot vote in polls in this forum