# Troubleshooting - Fileline 1.x documentation

> What to check when a download link gives a 404, a file comes out empty or broken, counts look wrong, or files can be opened directly.

## A download link shows "Page not found"

- **Pretty permalinks:** go to **Settings → Permalinks** and click **Save Changes** once. That refreshes WordPress's rewrite rules, including Fileline's `/download/` links.
- The download must be **published**. Drafts and private downloads only work for people who can edit them.
- A page or another plugin may already use `/download/`. Change Fileline's base with the `fileline_endpoint` filter (see **Hooks**).

## "This download has no file yet" or "this file is missing"

The download has no version with a file, or the file was deleted from the Media Library or the server. Open the download, check the **Versions** box and choose the file again.

## The file downloads empty, cut short or broken

- Something printed output before the file: a PHP notice, or a plugin echoing text. Fileline clears buffered output, but notices printed by the server can still slip in. Turn off `WP_DEBUG_DISPLAY` on live sites.
- With **X-Sendfile** or **X-Accel-Redirect**, the server must support it. Switch **Send files with** back to **PHP** to check.
- Very large files over slow connections can hit the server's time limit. Fileline asks PHP for no limit; if the host enforces one, use X-Sendfile or X-Accel-Redirect.
- Some security plugins and CDNs compress or rewrite responses. Exclude `/download/` (or `?fileline=`) from them.

## Files in the protected folder can be opened by their address

Click **Check the protection** under **Downloads → Settings**. If the check says the files can be opened:

- **nginx** ignores the `.htaccess` file: add the rule shown on the settings screen.
- **IIS** needs Request Filtering for the folder's `web.config`: ask your host to make sure it's installed and may be set per folder.
- **Apache** may be set up to ignore `.htaccess` files (`AllowOverride None`). Ask your host to allow them for the uploads folder, or add the same rules to the server's configuration.
- A CDN may have cached a file earlier: purge it.

Only files uploaded in a download's Versions box are in the protected folder. Files picked from elsewhere in the Media Library are marked **Also public**.

## Counts look too low or too high

- Your own test downloads count like anyone's. Use the `fileline_should_count` filter to leave out staff (see **Hooks**).
- Downloads by bots aren't counted. If a download tool you use is counted as a bot, or a bot isn't, adjust the list with `fileline_bot_agents`.
- With **Repeat downloads** set, visitors behind one shared address (an office, a school) may count once together. Set it to 0, or a few minutes.
- Behind a proxy or CDN every visitor can seem to have the same address; return the real one with `fileline_client_ip`.

## A download says it isn't available

It's **Unavailable**: it has rules from Fileline Pro and Fileline Pro isn't active. See **Members-only downloads → Unavailable downloads**.

## The login page doesn't come back to the download

A plugin that changes the login page may ignore WordPress's `redirect_to`. After logging in, use the download button again.

Source: https://extendiment.com/plugins/fileline/docs/1.x/troubleshooting
