---
title: Adding rewrite response header rules
description: Add a rewrite response header rule, which converts the response header value returned by the site into a public-facing value.
component: pingaccess
version: 8.3
page_id: pingaccess:pingaccess_user_interface_reference_guide:pa_adding_rewrite_response_header_rules
canonical_url: https://docs.pingidentity.com/pingaccess/9.1/pingaccess_user_interface_reference_guide/pa_adding_rewrite_response_header_rules.html
llms_txt: https://docs.pingidentity.com/pingaccess/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: January 12, 2024
superseded_by: https://docs.pingidentity.com/pingaccess/9.1/pingaccess_user_interface_reference_guide/pa_adding_rewrite_response_header_rules.html
section_ids:
  before-you-begin: Before you begin
  about-this-task: About this task
  steps: Steps
  example: Example:
---

# Adding rewrite response header rules

Add a rewrite response header rule, which converts the response header value returned by the site into a public-facing value.

## Before you begin

Confirm that you are not using the [agent](../introduction_to_pingaccess/pa_agent_model.html) model. Rewrite response header rules aren't available for agent deployments.

## About this task

This rule rewrites one of three response headers:

1. `Location`

2. `Content-Location`

3. `URI`

For example, the server-facing `Location` response header includes a path that begins with `/test-war/`. Using the information configured in the rewrite response header rule, PingAccess rewrites `http://private/test-war/` with a public-facing path such as:

```
http://public/path/
```

To add a rewrite response header rule:

## Steps

1. Click **Access**, then go to **Rules > Rules**.

2. Click **[icon: plus, set=fa]Add Rule**.

3. In the **Name** field, enter a unique name up to 64 characters.

   Special characters and spaces are allowed.

4. In the **Type** list, select **Rewrite Response Header**.

5. If the target host needs to be explicitly defined, clear the **Any Site Target Host** check box.

   When you select the **Any Site Target Host** check box, PingAccess will rewrite the response header URI if it contains a domain defined in a site's target host list.

6. If you clear the **Any Site Target Host** check box, enter the domain name used by the backend site in the **Server-Facing URI** field.

7. In the **Public Path** field, enter a valid URI path that you want to write into the URI.

   This must be a valid Uniform Resource Identifier (URI) *(tooltip: \<div class="paragraph">
   \<p>Identifies a web resource with a string of characters conforming to a specified format.\</p>
   \</div>)* path and begin and end with a forward slash ( `/`).

   ### Example:

   `/importantstuff/` or `/`

8. Click **Save**.
