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: cut-off the file extension
Author
Message |
ebijs
Newbie


Joined: 21 November 2004
Location: Netherlands
Posts: 22
Posted: 21 December 2010 at 4:53am

Hi,

I have version 2.

Need a rewrite rule for
http://www.domain.com/directory/product123.aspx
or http://www.domain.com/directory/product123.html

It should rewrite to
http://www.domain.com/directory/product123

In other words I need a rewrite rule which cut-off the
file extention.

Thanks in advance.

Ebijs.
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 21 December 2010 at 5:31am

It would be a little difficult as v2 can't perform file/folder existance check, but please try it as follows:

[ISAPI_Rewrite]

RewriteRule /directory/([^./]) /directory/$1.aspx [I,L]

But if you have subfolders in /directory/ folder, they may be affected by the rule...
Awaiting for your comments.

BTW, is there any way for you to upgrade to v3? It would allow to resolve many issues and make your rules more efficient.

__________________
Regards,
Anton
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