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: Beginner Question Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ASPRob
Newbie
Newbie


Joined: 24 June 2008
Online Status: Offline
Posts: 4
Posted: 24 June 2008 at 1:27pm | IP Logged Quote ASPRob

Hey gurus,

I've just started using the software today and am having some issues I will pass off as learning curve.  Hoping someone can help me spot my issue.

Scenario: IIS Server 6.0, running as localhost for dev purposes
Project: ASP.NET project with 1 page that prints out a test parameter that is supposedly being printed to the url after the '?' via the ISAPI filter.


Project structure:
/Test.aspx


I have configured the following rule file (.htaccess):

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.50

RewriteEngine on
RewriteBase /
RewriteRule ^([a-zA-Z1-9]+)/?  Test.aspx?key=$1 [NC]


My /Test.aspx simply prints out the key parameter value (e.g. if key=test, the page says "your key was: " + test).  Cookie-cutter example.

when I login with http://localhost/randomword/ I would expect to see "your key was: randomword" in my Test.aspx page.  Instead I see "your key was: Test".  Anyone able to tell me what is wrong with my URLrewriting line?  I am expecting any folder of chars/nums to be parsed out and used as my 'key'.

Any help is appreciated.

Thanks,
Rob


Edited by ASPRob - 24 June 2008 at 1:29pm
Back to Top View ASPRob's Profile Search for other posts by ASPRob
 
ASPRob
Newbie
Newbie


Joined: 24 June 2008
Online Status: Offline
Posts: 4
Posted: 24 June 2008 at 2:07pm | IP Logged Quote ASPRob

RewriteRule ^([a-zA-Z1-9]+)/  Test.aspx?key=$1 [NC]

That line will work... after rebuilding my matching string from scratch step by step I figured that one out.  Notice the missing '?' on the match.  can someone elaborate to me how that would affect it so much?  I read the documentation on non-greedy repeats but it isn't exactly clear if you don't know what they are.

Thx,
Rob
Back to Top View ASPRob's Profile Search for other posts by ASPRob
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3873
Posted: 25 June 2008 at 5:03am | IP Logged Quote Anton

Please check if you don't have ISAPI_Rewrite filter installed twice.
And try the following rule:
RewriteEngine on
RewriteBase /
RewriteRule ^([a-zA-Z1-9]+)/?$  Test.aspx?key=$1 [NC]



__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
ASPRob
Newbie
Newbie


Joined: 24 June 2008
Online Status: Offline
Posts: 4
Posted: 25 June 2008 at 7:47am | IP Logged Quote ASPRob

How can i confirm if it is installed once or twice? 

Edit: It does appear to be installed twice, unless I am confused as to functionality.

simple test:
create 4 html pages: test1.html, test2.html, test3.html, test4.html

each page has 1 line of text in it: "This is page 1(or 2,3,4)"

Ask for localhost/test1.html and I get a page that says "This is page 3".

My re-write rules for this test are:
RewriteEngine on
RewriteBase /
RewriteRule ^test3\.html test4\.html [NC]
RewriteRule ^test2\.html test3\.html [NC]
RewriteRule ^test1\.html test2\.html [NC]


Question: 
How would i find where the filter is installed twice at and remove one of the installations?


Edited by ASPRob - 25 June 2008 at 9:03am
Back to Top View ASPRob's Profile Search for other posts by ASPRob
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3873
Posted: 26 June 2008 at 3:35am | IP Logged Quote Anton

Please try these rules:

RewriteEngine on
RewriteBase /
RewriteRule ^test3\.html$ test4.html [NC,L]
RewriteRule ^test2\.html$ test3.html [NC,L]
RewriteRule ^test1\.html$ test2.html [NC,L]

ISAPI_Rewrite filter should be installed globally, please make sure you don't have it installed on site level also (IIS - Web Site Properties - ISAPI filters).


__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
ASPRob
Newbie
Newbie


Joined: 24 June 2008
Online Status: Offline
Posts: 4
Posted: 26 June 2008 at 7:09am | IP Logged Quote ASPRob

Thanks Anton!

I went and uninstalled the product then reinstalled it and it seems to have solved the problem.  Although I have a lot to learn still about the syntax of the .htaccess files at least now the behaviour is logical.  The two filtering was really  the source of most of my issues. :)

Cheers!

R.
Back to Top View ASPRob's Profile Search for other posts by ASPRob
 

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