Incorrect Backlink To Website w/ 2 http:// includes

Topics: Developer Forum, Project Management Forum, User Forum
Mar 7, 2011 at 8:22 PM

Unfortunately, we've had a few people link to one of our domains incorrectly in a link building campaign and the incoming link to our website is showing up as the following (domain.com substituted for the actual domain) http://www.domain.com/cymbals/sabian-aax.asphttp://www.domain.com/cymbals/sabian-cymbals.asp

I've tried to create a rule to 301 redirect this problematic URL to http://www.domain.com/cymbals/sabian-aax.asp as it should be, but our IIS7 server is throwing the following error with or without the rule. Error on page regardless: The page cannot be displayed because an internal server error has occurred.

RedirectRule ^/cymbals\/sabian-aax\.asphttp(.*) http://www.domain.com/cymbals/sabian-cymbals.asp [I,R=301]

It will work if I use http://www.domain.com/cymbals/sabian-aax.asphttp but anything after or including the colon appears to derail it. Any ideas? 

Thanks in advance Cheeso or anyone else,

Matt

Coordinator
Mar 8, 2011 at 2:57 PM

More than one colon is disallowed in HTTP URLs according to the relevant IETF RFC, 2396 .  If there are additional colons following the first one, it must be escaped, aka URL encoded.  Typically web applications will URL-encode the URLs automatically.   It could be that is what is causing your rule to not apply.

But there is no sense in guessing.  The way to determine what is really happening is to examine the IIRF log.  Set the LogLevel to 3 and then submit that broken URL to your server, and see what IIRF says.

 

 

Mar 8, 2011 at 3:29 PM

Cheeso,

I enabled RewriteLogLevel 3 and executed the URL however the log doesn't appear to mention anything about the URL. There is quite a bit of traffic on there, so I quickly changed the log location before and after executing. Any thoughts? It appears to grabbing the favicon for some reason? (I replaced the actual domain with domain.com in the log below.)

 

Tue Mar 08 11:24:14 -  4196 - -------------------------------------------------------
Tue Mar 08 11:24:14 -  4196 - Ionic ISAPI Rewriting Filter (IIRF) 2.0.1.15 RELEASE
Tue Mar 08 11:24:14 -  4196 - IIRF was built on: Dec  3 2009 11:49:15
Tue Mar 08 11:24:14 -  4196 - GetLogFile: app:'/LM/W3SVC/47/ROOT'  new log:'\\FS-WEB\Users\_ISAPI Rewrite\blah.11364.log'
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: actual log file '\\FS-WEB\Users\_ISAPI Rewrite\blah.11364.log'
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: ini file: '\\FS-WEB\Users\domain.com\htdocs\Iirf.ini'
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: ini file timestamp: 2011/03/08 11:24:12 Eastern Standard Time
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: WARNING: line 10: unrecognized directive, ignoring it: 'StatusInquiry'
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: line  13: RewriteCond   %{REQUEST_METHOD}  GET
Tue Mar 08 11:24:14 -  4196 - ParseCondModifierFlags: '[I]'
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: line  14: RedirectRule (rule 1)  '^/(default|index)\.(asp|html|htm)$'  'http://www.domain.com' [I,R=301]
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: line  17: RewriteCond   %{HTTP_HOST}  ^(?!www\.).*domain\.com$
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: line  18: RedirectRule (rule 2)  '^/(.*)$'  'http://www.domain.com/$1'  [R=301]
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: line  21: RedirectRule (rule 3)  '^/(mike-egge|karl-greathouse|jere-groft|sherick-guthrie|jim-love|paul-murr|rick-nonnemocher)\.(asp)$'  'http://www.domain.com/instructors.asp' [I,R=301]
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: line  22: RedirectRule (rule 4)  '^/(john-peifer|mark-ryan|andy-shaffer|mel-torres|dan-valkenburgh|aaron-walker|randy-zimmerman)\.(asp)$'  'http://www.domain.com/instructors.asp' [I,R=301]
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: line  23: RedirectRule (rule 5)  '^/cymbals\/sabian-aax\.asphttp(.*)'  'http://www.domain.com/cymbals/sabian-cymbals.asp' [I,R=301]
Tue Mar 08 11:24:14 -  4196 - ReadSiteConfig: Done reading, found 5 rules (0 errors, 1 warnings) on 24 lines
Tue Mar 08 11:24:14 -  4196 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Mar 08 11:24:14 -  4196 - HttpFilterProc: cfg= 0x021AACE0
Tue Mar 08 11:24:14 -  4196 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Mar 08 11:24:14 -  4196 - DoRewrites
Tue Mar 08 11:24:14 -  4196 - DoRewrites: Url (no decoding): '/favicon.ico'
Tue Mar 08 11:24:14 -  4196 - EvaluateRules: depth=0
Tue Mar 08 11:24:14 -  4196 - EvaluateRules: Rule 1 : -1 (No match)
Tue Mar 08 11:24:14 -  4196 - EvaluateRules: Rule 2 : 2 matches
Tue Mar 08 11:24:14 -  4196 - EvalCondition: Cond %{HTTP_HOST} ^(?!www\.).*domain\.com$ => FALSE
Tue Mar 08 11:24:14 -  4196 - EvalConditionList: rule 2, FALSE, Rule does not apply
Tue Mar 08 11:24:14 -  4196 - EvaluateRules: Rule 3 : -1 (No match)
Tue Mar 08 11:24:14 -  4196 - EvaluateRules: Rule 4 : -1 (No match)
Tue Mar 08 11:24:14 -  4196 - EvaluateRules: Rule 5 : -1 (No match)
Tue Mar 08 11:24:14 -  4196 - EvaluateRules: returning 0
Tue Mar 08 11:24:14 -  4196 - DoRewrites: No Rewrite
Tue Mar 08 11:24:15 -  4196 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Mar 08 11:24:15 -  4196 - HttpFilterProc: cfg= 0x021AACE0
Tue Mar 08 11:24:15 -  4196 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Mar 08 11:24:15 -  4196 - DoRewrites
Tue Mar 08 11:24:15 -  4196 - DoRewrites: Url (no decoding): '/favicon.ico'
Tue Mar 08 11:24:15 -  4196 - EvaluateRules: depth=0
Tue Mar 08 11:24:15 -  4196 - EvaluateRules: Rule 1 : -1 (No match)
Tue Mar 08 11:24:15 -  4196 - EvaluateRules: Rule 2 : 2 matches
Tue Mar 08 11:24:15 -  4196 - EvalCondition: Cond %{HTTP_HOST} ^(?!www\.).*domain\.com$ => FALSE
Tue Mar 08 11:24:15 -  4196 - EvalConditionList: rule 2, FALSE, Rule does not apply
Tue Mar 08 11:24:15 -  4196 - EvaluateRules: Rule 3 : -1 (No match)
Tue Mar 08 11:24:15 -  4196 - EvaluateRules: Rule 4 : -1 (No match)
Tue Mar 08 11:24:15 -  4196 - EvaluateRules: Rule 5 : -1 (No match)
Tue Mar 08 11:24:15 -  4196 - EvaluateRules: returning 0
Tue Mar 08 11:24:15 -  4196 - DoRewrites: No Rewrite
Tue Mar 08 11:24:16 -  4196 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Mar 08 11:24:16 -  4196 - HttpFilterProc: cfg= 0x021AACE0
Tue Mar 08 11:24:16 -  4196 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Mar 08 11:24:16 -  4196 - DoRewrites
Tue Mar 08 11:24:16 -  4196 - DoRewrites: Url (no decoding): '/favicon.ico'
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: depth=0
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 1 : -1 (No match)
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 2 : 2 matches
Tue Mar 08 11:24:16 -  4196 - EvalCondition: Cond %{HTTP_HOST} ^(?!www\.).*domain\.com$ => FALSE
Tue Mar 08 11:24:16 -  4196 - EvalConditionList: rule 2, FALSE, Rule does not apply
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 3 : -1 (No match)
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 4 : -1 (No match)
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 5 : -1 (No match)
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: returning 0
Tue Mar 08 11:24:16 -  4196 - DoRewrites: No Rewrite
Tue Mar 08 11:24:16 -  4196 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Mar 08 11:24:16 -  4196 - HttpFilterProc: cfg= 0x021AACE0
Tue Mar 08 11:24:16 -  4196 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Mar 08 11:24:16 -  4196 - DoRewrites
Tue Mar 08 11:24:16 -  4196 - DoRewrites: Url (no decoding): '/favicon.ico'
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: depth=0
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 1 : -1 (No match)
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 2 : 2 matches
Tue Mar 08 11:24:16 -  4196 - EvalCondition: Cond %{HTTP_HOST} ^(?!www\.).*domain\.com$ => FALSE
Tue Mar 08 11:24:16 -  4196 - EvalConditionList: rule 2, FALSE, Rule does not apply
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 3 : -1 (No match)
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 4 : -1 (No match)
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: Rule 5 : -1 (No match)
Tue Mar 08 11:24:16 -  4196 - EvaluateRules: returning 0
Tue Mar 08 11:24:16 -  4196 - DoRewrites: No Rewrite
Tue Mar 08 11:24:17 -  4196 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Mar 08 11:24:17 -  4196 - HttpFilterProc: cfg= 0x021AACE0
Tue Mar 08 11:24:17 -  4196 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Mar 08 11:24:17 -  4196 - DoRewrites
Tue Mar 08 11:24:17 -  4196 - DoRewrites: Url (no decoding): '/favicon.ico'
Tue Mar 08 11:24:17 -  4196 - EvaluateRules: depth=0
Tue Mar 08 11:24:17 -  4196 - EvaluateRules: Rule 1 : -1 (No match)
Tue Mar 08 11:24:17 -  4196 - EvaluateRules: Rule 2 : 2 matches
Tue Mar 08 11:24:17 -  4196 - EvalCondition: Cond %{HTTP_HOST} ^(?!www\.).*domain\.com$ => FALSE
Tue Mar 08 11:24:17 -  4196 - EvalConditionList: rule 2, FALSE, Rule does not apply
Tue Mar 08 11:24:17 -  4196 - EvaluateRules: Rule 3 : -1 (No match)
Tue Mar 08 11:24:17 -  4196 - EvaluateRules: Rule 4 : -1 (No match)
Tue Mar 08 11:24:17 -  4196 - EvaluateRules: Rule 5 : -1 (No match)
Tue Mar 08 11:24:17 -  4196 - EvaluateRules: returning 0
Tue Mar 08 11:24:17 -  4196 - DoRewrites: No Rewrite

Coordinator
Mar 9, 2011 at 2:14 AM

favicon.ico is probably being requested by your browser.

I don't see the "broken" URL mentioned in the IIRF log either.  Are you sure you have IIRF configured in the appropriate vdir (/cymbals) for that request?

Mar 9, 2011 at 3:12 PM

IIRF is setup in IIS for all directories on all of our websites. If I shorten the incorrect URL before the second colon it will direct as it should and it does show up in IIRF logs.

I.e: with the current rule setup http://www.domain.com/cymbals/sabian-aax.asphttp will properly redirect to http://www.domain.com/cymbals/sabian-aax.asp

Any other thoughts about what can I do about this? The colon seems to be what is throwing the redirecting or loading of the page off.

Coordinator
Mar 9, 2011 at 3:47 PM

It could be you have a URL scanner that is preventing the broken URL from arriving, before it gets to IIRF.

For example, see http://www.iis.net/download/UrlScan

If I were you I would check the IIS log, to see if IIS is seeing the broken URL.

Also try an HTTP debugging proxy, like Fiddler2, to see what requests are being made and the responses that get received.

Just to repeat, from your log file, it looks like IIRF is never seeing the URL that includes 2 colons.  It cannot redirect or rewrite, if it doesn't actually see the URL.

Good luck.