---
title: Change the traffic with rules
project: TotalTraffic
version: Latest
section: guides
language: en
license: 
url: https://totaljs.es/docs/totaltraffic/latest/guides/rules/
updated: 2026-12-02T15:40:21.062Z
---

# Change the traffic with rules

> A rule does something with the requests that fit it, each time they go through. It can pause them, answer them with a file or send them to another server.

Rules work with plain HTTP, and with the HTTPS of [the domains that you read](/totaltraffic/latest/guides/read-https/). They cannot touch the rest.

## Make a rule

The easiest way is from a request: right-click it and choose **Pause it next time…**, **Answer it with a file…** or **Send it to another server…** The rule opens with its address written.

To start from nothing, press the button **Rules** at the top, or ⌘R on the Mac and Ctrl+R on Windows and Linux, and then **New rule**. Fill it in and press **Keep the rule**.

## What it does

| Choice | Its page |
| --- | --- |
| **Pause it, to change it** | [Pause a request or its answer](/totaltraffic/latest/guides/pause/) |
| **Answer with a file of this computer** | [Answer with a file](/totaltraffic/latest/guides/answer-with-a-file/) |
| **Send it to another server** | [Send requests to another server](/totaltraffic/latest/guides/another-server/) |

## Which requests it fits

In **Addresses**, `*` stands for anything:

| Write | It fits |
| --- | --- |
| `api.example.com` | Every address of that host |
| `api.example.com/users` | That address and no other |
| `api.example.com/users*` | The same with anything after it, such as `?page=2` or `/7` |
| `https://*.example.com/*` | Only HTTPS, in the names under `example.com` |
| `localhost:8000/*` | That host and port |

The query counts. A rule made from a request that had one ends in `?*`, so it fits the same address with any query. Change the end to `*` to fit it without a query too.

**Method** limits the rule to one method. **Any method** fits all.

## When more than one fits

- If any of them pauses, the request is paused.
- If any answers with a file, the first of those answers, and the server is not asked.
- If not, the first one that sends to another server does it.

The arrow of a rule moves it up.

## Turn off, change and remove

The box at the start of a rule turns it on and off. The pencil changes it, and the bin removes it without asking. The bottom of the window says how many are on: rules stay when you quit, so look there if something answers in a strange way.
