Help with rules

Topics: Developer Forum, User Forum
May 10, 2010 at 5:23 PM

Here is my list


RewriteCond %{HTTP_HOST} ^$ [I,OR] 
RewriteCond %{HTTP_HOST} ^$ [I] 
RedirectRule (.*)$$1 [R=301]

# fix missing slash on folders
# note, this assumes we have no folders with periods!
RewriteRule (^[^.]+[^/]$) $1/ [I,R=301] # remove index pages from URLs
RewriteRule (.*)/index.cfm$ $1/ [I,R=301] #3
RewriteRule (.*)/index.htm$ $1/ [I,R=301] #4
RewriteRule (.*)/index.html$ $1/ [I,R=301] #5
RedirectRule ^/freelance_coldfusion.cfm [I,R=301] #6
RedirectRule ^/coldfusion_jobs.cfm [I,R=301] #7
RewriteRule ^/(\d+) /detail.cfm?cid=$1 [L,I] #8
RewriteRule company/[^?/]*/(\d+) /detail.cfm?cid=$1 [L,I] #/detail.cfm?cid=32&company=web_author #9
RedirectRule /detail.cfm?cid=(\d+?)&company=(\S+)$1 [I,R=301]

for the first set, if someone comes in with i want to rewrite to which would be #7 in the list. Now, when it comes through with the goto... will it still go through the rest of the list with the new redirect domain? Cause right now it doesn't work, but if I go to it does.

And also, does everything look right? order etc?



May 10, 2010 at 9:56 PM

Your first redirect should work, but I don't know what it will redirect to.  It might capture the entire incoming URL, but it mightnot.  To be safe I'd put a ^ in the pattern to make sure you get the whole thing.  

After that redirect fires, yes, the new request will run through the full set of rules.   That is, IF IIRF installed in such a way that the redirected request comes right back to the same server.  That depends on your DNS setup, of course.

To figure out what's happening, I'd recommend examining the IIRF log, and a Fiddler trace, to see if you are getting the responses and activity you expect.

May 11, 2010 at 1:38 AM

I still haven't got it to work. I was looking at the iirf log and nothing had output since 12.25, so I deleted and all of a sudden the log is bigger. I look in it, but there is only the stuff previous to 12.25 and a couple reqs I just did. but inbetween there are a ton of these statements

Mon May 10 20:33:53 -  6608 - Cached: DLL_THREAD_DETACH

What is this? problem?

May 11, 2010 at 2:29 AM

That message in itself is not a problem, no.

If you have an IIRF log level of 2 or higher, IIRF will log something for each request. 
It's odd for you to see THREAD_DETACH messages only - those normally are emitted only when log level is 5 or higher,
but in that case you would also expect to see log messages for every request that flows through IIS.

I can't explain what you're seeing.  What version of IIRF are you running.

Can you stop and restart IIRF?  In that case you will see a new IIRF log file, with the IIRF version clearly indicated in the log file.