Author Topic: HOWTO: Rewrite HTML body URLs to avoid absolute protocol references  (Read 3899 times)

Offline jmelika

  • Administrator
  • Hero Member
  • *****
  • Posts: 284
  • Karma: 4
I have some global rewrites that get about 1K hits per minute, and it hardly made a difference in the RAM and CPU usage.  I was basically receiving hits to a URL that didn't exist on the app, and give a 200 response to redirect the user to a different URL.

Imagine someone on TV making a mistake saying go to (www.something.com/wrongpath) and people start hitting that URL because it's what this !@#$ just said.  I had to jump on the netscaler and do a rewrite to send them to the correct URL.

Those hits were huge spike, but CPU and RAM did not get affected much.

JM

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 282
  • Karma: 17
Continuing the topic that oldguy stated here is a link to an article that not to many developers know, and it should be fairly obvious.
http://www.w3.org/2001/tag/doc/whenToUseGet.html

I got to this while looking for documentation on caching ajax apps.

Daniel

Offline Paul B

  • Hero Member
  • *****
  • Posts: 123
  • Karma: 14
Indeed, the manual says: The Rewrite feature modifies only the header section of an HTTP request or response, not the data section. "

Well, they finally decided to correct this in the version 8.1 manual, where it clearly states:

"The rewrite feature is a general-purpose utility for modifying HTTP headers and body text. You can use it to to add HTTP headers to an HTTP request or response, make modifications to individual HTTP headers, or delete HTTP headers. It also lets you modify the HTTP body in requests and responses."

Isn't it pleasing when the documentation actually reflects reality!


Paul B