mraid.js
5 posts
• Page 1 of 1
mraid.js
Because of third party ads that were not setup correctly, we get a ton of 404 errors generated by calls to an ad script file called mraid.js. From my understanding, the file is actually a script commonly used by ad servers to serve mobile ads. It can be called in any subfolder. For example:
/mraid.js
/blah/mraid.js
/blah/blah/mraid.js
What would be the best rewrite rule to handle this to just ignore the call all together so my web server does not have to process the request?
/mraid.js
/blah/mraid.js
/blah/blah/mraid.js
What would be the best rewrite rule to handle this to just ignore the call all together so my web server does not have to process the request?
Re: mraid.js
Hello.
To make life simple one may say use something like RewriteRule mraid\.js - [F]
However, understanding your real demand, my suggestion would be not to use URL rewriting here. Really, 404s are one of fastest things IIS can do. If you concerning about impact it has on your server, you can use IIS Request Filtering. Use URL request rule in request filtering widget, set it as "mraid.js". Adding layer of URL rewriting will actually put more load on a server, insignificant, but since you are trying to eliminate one of the tiniest load of 404s possible, using URL rewriter cannot be justified.
To make life simple one may say use something like RewriteRule mraid\.js - [F]
However, understanding your real demand, my suggestion would be not to use URL rewriting here. Really, 404s are one of fastest things IIS can do. If you concerning about impact it has on your server, you can use IIS Request Filtering. Use URL request rule in request filtering widget, set it as "mraid.js". Adding layer of URL rewriting will actually put more load on a server, insignificant, but since you are trying to eliminate one of the tiniest load of 404s possible, using URL rewriter cannot be justified.
Re: mraid.js
The problem can be that Google punish a site for lots of 404s.
One question to ask is why requests to the site are referencing this file? Do you have links anywhere on the site that reference it?
One question to ask is why requests to the site are referencing this file? Do you have links anywhere on the site that reference it?
Re: mraid.js
RewriteRule mraid\.js - [F]
What does the [F] do?
Would that cover requests to mraid.js in any subfolder? /mraid.js and /blah/mraid.js and /blah/blah/mraid.js?
The reason that the file is getting called is from third party ads that are being displayed through doubleclick on our site, so it's really out of our hands as far as eliminating it at the source. Google wont know about the 404s as google doesn't really call it. But my custom 404.asp script is handling all of the requests, unless the URL structure is in a way that the url rewrite is actually calling another page, and perhaps throwing a 500 error.
I really don't need to give a good server response, I'd like like to intercept the requests to prevent it executing a script.
Re: mraid.js
The [F] flag stands for 'forbidden' and means send 403 response immediately.
But again I suggest you to use Request Filtering to cut off these requests on probably earlier stage.
But again I suggest you to use Request Filtering to cut off these requests on probably earlier stage.
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 17 guests