Which of the following is a correct rewrite action to replace http:// with https:// in the response body?

> add rewrite action Act1 replace_all "HTTP.RES.BODY(200000)" "\"https://\"" - pattern "http://"

> add rewrite action Act1 replace_all "HTTP.RES.BODY(200000)" "\"http:\"" - pattern "\\https://\\"

> add rewrite action Act1 replace_all "HTTP.RES.BODY(200000)" "\"https //\"" - pattern "http://"

The concept being tested is how to modify the response body by replacing text, specifically turning http:// links into https:// links using a rewrite action. In Citrix ADC, you use a rewrite action with replace_all on the response body (HTTP.RES.BODY(200000)) so every occurrence of a pattern can be changed in one pass. Here, the goal is to locate the insecure scheme http:// and replace it with the secure scheme https://, ensuring all URLs in the body switch to HTTPS.

The chosen form searches for http:// and supplies the replacement as the escaped form of https://. By targeting the body and applying a global replace, every http:// in the response body becomes https://, which is exactly what you want for broader HTTPS enforcement in responses. The other options either attempt to replace the wrong substring, or use an incorrect replacement (such as missing the slashes or misescaping), which would not yield valid https:// in the body.

> add rewrite action Act1 replace_all "HTTP.RES.BODY(200000)" "\"https:\"" - pattern "http://"

Want more questions?

All options are one-time payments.

$25.99

30 day pass for new members

All the basics to get you started

  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 30 day premium pass access
$59.99$171.99 usd

6 month DELUXE pass (most popular)

Full access FOR 6 MONTHS! & the ultimate digital PDF study guide (BONUS)

  • $171.99 usd value for $59.99! You save $106!
  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 6 months of full access
  • Ultimate digital PDF study guide included
  • Priority support
$15.99 $24.99

Ultimate digital PDF study guide

For those that prefer a more traditional form of learning

  • Available for instant download
  • Available offline
  • Hundreds of practice multiple choice questions
  • Comprehensive content
  • Detailed explanations
Image Description
Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy