URL not being read properly

Topics: Developer Forum, User Forum
Feb 7, 2008 at 10:39 AM
Hi

I have just installed the latest version of isapi filter and it works great for a while but then seems to stop reading the urls properly and starts to give me 404 errors.

I have checked the log files and found the following:

Thu Feb 07 11:32:42 2008 - New Url: '/173/buy-spares-online/sub-categories/parent-products/BoSSClimaFrame.html?Category=1&SubCategory=5'
Thu Feb 07 11:32:42 2008 - Rule 1 : 3 matches
Thu Feb 07 11:32:42 2008 - Result (length 44): /index.php?page=173&Category=1&SubCategory=5
Thu Feb 07 11:32:42 2008 - Last if Match
Thu Feb 07 11:32:42 2008 - Rewrite Url to: '/index.php?page=173&Category=1&SubCategory=5'
Thu Feb 07 11:32:44 2008 - New Url: '˜'.?Category=1&SubCategory=6'
Thu Feb 07 11:32:44 2008 - No Rewrite
Thu Feb 07 11:32:44 2008 - New Url: 'øò.?Category=1&SubCategory=7'
Thu Feb 07 11:32:44 2008 - No Rewrite
Thu Feb 07 11:32:46 2008 - New Url: '˜'.?Category=1&SubCategory=8'
Thu Feb 07 11:32:46 2008 - No Rewrite

the first one worked fine but the when it came to the second page, the beginning bit of the url is read in as funny characters which causes the regex not to work, therefore causing my 404. Once it has started using these funny characters, it seems to continue using them until I restart my IIS.

I was wondering if anyone else had come across this problem or if anyone new of how to fix it
Coordinator
Feb 7, 2008 at 7:22 PM
Pete, what does it mean exactly
it works great for a while but then seems to stop reading the urls properly and starts to give me 404 errors

How long is "a while" ?
Feb 8, 2008 at 7:27 AM
Hi Cheeso,

it usually works for about four or five pages of browsing and then stops working. Sometimes it can work for only one page and then stop working when I click a link to the second page.

My rewrite rules are as follows:

RewriteRule ^/(0-9+)/.\?(.)$ /index.php?page=$1&$2 L
RewriteRule ^/(0-9+)/.*$ /index.php?page=$1 L

The first rule should take the number between the first slashes and any get variables
The second rule should just get the number

I can send you a level 5 log if that would help
Thanks
Pete
Coordinator
Feb 12, 2008 at 12:38 AM
Hey Pete, can you give me those rules enclosed in double-curly braces? { { ... } }
Thanks!
Feb 12, 2008 at 8:15 AM
Hi Cheeso,

I've gone with helicon's rewriter, seems to do the same thing but easier.

Thanks anyway
Pete


Cheeso wrote:
Hey Pete, can you give me those rules enclosed in double-curly braces? { { ... } }
Thanks!

Feb 22, 2008 at 3:55 PM
Hey it happens the same to me. I installed the latest version and this one reads as funny characters. Here is an example:

Fri Feb 22 14:40:50 2008 - DllMain THREAD_DETACH, threadId= 3884
Fri Feb 22 14:42:30 2008 - New Url: '˜'
Fri Feb 22 14:42:30 2008 - No Rewrite
Fri Feb 22 14:42:31 2008 - New Url: '/styles/zonajobs.css'
Fri Feb 22 14:42:31 2008 - No Rewrite
Fri Feb 22 14:42:31 2008 - New Url: '8'
Fri Feb 22 14:42:31 2008 - No Rewrite
Fri Feb 22 14:42:31 2008 - New Url: '`–'
Fri Feb 22 14:42:31 2008 - No Rewrite
Fri Feb 22 14:42:31 2008 - New Url: '`'
Fri Feb 22 14:42:31 2008 - No Rewrite

Can somebody give me a hand with this?? I'm running out of ideas...

Thanks
Coordinator
Feb 24, 2008 at 1:59 PM
And Rojeti,
it works for only the first couple pages? is that right? it fails fairly quickly for you?
Mar 17, 2008 at 3:29 PM
No, it happens all the time to me. Although there are some URLs (like path of images for example) that works fine.
Apr 7, 2008 at 10:51 PM
Edited Apr 7, 2008 at 10:56 PM
I am seeing this same problem with the latest beta (1.2.13b) and IIS 5.1. I have found out that on the 13th attempt, it will display and use the proper url, but the 12 in between are just bad strings.

Mon Apr 07 17:38:40 2008 - New Url: '€'
Mon Apr 07 17:38:47 2008 - New Url: '`÷'
Mon Apr 07 17:38:50 2008 - New Url: '@×
'
--snip 9 more --
Mon Apr 07 17:38:51 2008 - New Url: '/media/scripts'

The last one is the proper url that I have been 'GET'ting the whole time.

Relavant .ini file:
RewriteLog c:\temp\iirfLog.out
RewriteLogLevel 4

RewriteRule ^/media/(images|scripts|styles) $1 [I,L]

RewriteRule ^(.*)$ /test.asp?page=$1 [U,I,L]


Hope that helps,
Nick
Apr 9, 2008 at 12:13 AM
Hey this is happening for me too! I have had IIRF setup on my computer and working great now for some time. But with each additional developer, I have to get it setup locally for each of them. It's usually not a problem, but I have one machine now that is doing what is described above.

It seems that after I restart IIS, the filters work for the first few pages (maybe 2-4 pages) and then all the sudden stop working and I get 404's.
I know the filters are correct as they are copied directly from my file where they work properly. Also, the filters work for a while after any time I restart IIS.

I've made sure that IUSR_hostname has the proper permissions on the .ini & .dll file. They are both inside the C:\windows\system32\inetsrv\ folder just as I've set this up many other times before.

Any ideas on this?
Coordinator
Apr 15, 2008 at 11:25 AM
I don't have any ideas.
I looked closely at the source code, cannot find the bug.
What I Really Need to fix this is a repro case,
or I need someone else to debug it (attach to the worker process when the problem happens).
Coordinator
Apr 15, 2008 at 12:06 PM
OK, I have some hypotheses.
I would need some people to volunteer to test patched code, in order to narrow the problem.
I can provide a patched dll, and you'd run it to see if you have the same problem.

This may take a couple back-n-forths, so you'd have to sign on to work with me on this.
Mase? you up for it?
Neouser?
Apr 15, 2008 at 5:26 PM
Cheeso, I'm willing to help. Problem is, I may not be the fastest to reply or test because the issue is not on my computer. I'll have to install it on a co-workers machine to test it out.
For your repro case, I can provide my config file if you need. Log file? What information do you need to help track this down?
Apr 16, 2008 at 4:54 PM
Send it this way. It's my machine that this is happening on, I can quickly get it up and see what is going on.

-Nick