Unpack method: install the PHP alongside your pages
In The White Rabbit (TWR) Unpack method, the index.php can sit in the same folder as your Safe Page and Offer Page files. Instead of fetching the pages from another address, it opens the files straight from your hosting. With no other server involved, this is the most compatible way to use Unpack.
How it works
When someone clicks your ad, the hosting opens index.php. It checks with TWR, which decides whether the visit sees the Safe Page or the Offer Page, and shows that page on the same address, with no redirect. What changes between the two Unpack setups is where the pages live:
Pages by URL | Pages by file (this article) | |
|---|---|---|
Where the pages live | At any address on the internet | On your hosting, in the same folder as |
What you enter in the campaign | The page address: | The page's file name: |
Where you install | On a site just for it | On the same site as the pages |
When to use it | The page isn't a file of yours: Shopify store, affiliate link, page builder | You have the page files on your hosting |
The URL setup is covered in Unpack method: install the campaign on your hosting.
Before you start
- A domain connected to TWR, used only to generate the PHP file. See how to connect your domain.
- Hosting that runs PHP, with a site where you'll put your pages. That site's domain must be different from the one connected to TWR, and it's the one that goes in your ad.
Step by step
1. Put your pages in the public_html folder
In your hosting's file manager, open the site's public folder, which on most hosts is called public_html. It's what opens when someone visits your domain. Put the Safe Page file and the Offer Page file there:
public_html/
├── safe.html
└── offer.html
safe.html and offer.html are just examples. You can give each file any name you like, as long as you enter exactly that name in the campaign, in step 2.
If one of your pages is named index.html, rename it. The name index is reserved for the campaign file, which you upload in step 4.
2. Create the campaign with the file names
In Campaigns, click New campaign. Fill in the name, the domain connected to TWR, the traffic source, the countries, and the devices, and select Unpack as the delivery method for the Safe Page and the Offer Page. Each field is explained in Unpack method: install the campaign on your hosting.
The difference is in the Safe Page URL or file and Offer Page URL or file fields: instead of the URL, enter the file name with ./ in front. ./ means "in this same folder", so ./safe.html means "the safe.html file in the same folder as index.php".
File name on your hosting | What to enter in the campaign |
|---|---|
|
|
|
|
|
|
If the campaign already exists, open it and click Edit campaign to swap the URL for the file name.

Safe.html and safe.html are different files.3. Save the campaign and download the PHP file
Click Save. TWR shows the campaign parameters, which go in your ad together with the site URL (step 5). Click Download PHP.
4. Upload the file to public_html and rename it to index.php
Upload the PHP file to the same public_html folder, next to your pages, and rename it to index.php. The folder looks like this:
public_html/
├── index.php campaign file
├── safe.html entered as ./safe.html
└── offer.html entered as ./offer.html
index.php. If you downloaded it more than once and your computer added a number to the name, rename it.5. Add the URL and parameters to your ad
The ad URL is the domain of the site where you put your pages and index.php, always with https://. Paste it into your traffic source together with the campaign parameters:
- Most sources have one field for the destination URL and another for the URL parameters. Use each one in its own field.
- If the source has no field for parameters, append them to the URL with
?(e.g.https://www.yourdomain.com/?parameters). - If you use your own tracking parameters, join them to TWR's with
&, no spaces and no second?.
6. Test the campaign
Open the site URL directly in your browser: since the visit doesn't come from the ad, you see the Safe Page. To see the Offer Page, open the campaign in TWR, click Test Offer, copy the test parameter, and add it to the URL after ?. The Offer Page opens on the same address.

When you're done, turn test mode off. It doesn't affect the campaign, so you can test even with your ad running.
Mix file and URL
Both pages don't have to use the same form. If your Offer Page is a Shopify store, for example, enter its URL in the campaign and keep only the Safe Page as a file:
public_html/
├── index.php campaign file
└── safe.html entered as ./safe.html
Offer Page: https://yourstore.com
A page entered by URL shows on the ad address, the same way as with TWR Mirror. If it has a checkout, a video player, or a script locked to its original address, check the result in the step 6 test before launching your ad.
Scale with the same PHP
To run the same campaign in another ad account, copy the files from public_html (the index.php and your pages) to a site with a different domain, without changing anything. Clicks on both domains land in the same TWR campaign. See how to scale the same offer across multiple ad accounts.
When to update the PHP file
Download the PHP again and replace index.php on your hosting when you:
- change the campaign domain;
- change the Safe Page file name or URL in the campaign.
You don't need to update it when you:
- edit the content of the page files on your hosting;
- change the Offer Page file name or URL, or link an A/B test.
Your ad parameters only change if you turn the Unique Token on or off. In that case, copy the new parameters and update them in your ad.
Updated on: 27/09/2026
Thank you!