Title: Vantorix &#8211; Subfolder Link Fixer
Author: Vantorix
Published: <strong>2026 年 10 月 12 日</strong>
Last modified: 2026 年 10 月 12 日

---

搜尋外掛

![](https://ps.w.org/vantorix-subfolder-link-fixer/assets/banner-772x250.png?rev
=3740677)

![](https://ps.w.org/vantorix-subfolder-link-fixer/assets/icon.svg?rev=3740677)

# Vantorix – Subfolder Link Fixer

 由 [Vantorix](https://profiles.wordpress.org/itsrakibroni/) 開發

[下載](https://downloads.wordpress.org/plugin/vantorix-subfolder-link-fixer.1.1.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/vantorix-subfolder-link-fixer/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/vantorix-subfolder-link-fixer/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/vantorix-subfolder-link-fixer/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/vantorix-subfolder-link-fixer/#developers)

 [技術支援](https://wordpress.org/support/plugin/vantorix-subfolder-link-fixer/)

## 外掛說明

Links such as `/`, `/about-us/` or `/contact/` are handy because they work on any
domain. But when WordPress lives in a subfolder — for example `https://example.com/
demo/` — those links jump to the domain root and visitors land on the wrong page
or a 404.

**Subfolder Link Fixer** detects your site’s subfolder from the Home URL and quietly
fixes those links in the page sent to the browser:

 * `href="/"` becomes `href="/demo/"`
 * `href="/about-us/"` becomes `href="/demo/about-us/"`
 * Form actions like `action="/contact/"` are fixed too.

Nothing is written to your content. Your posts, menus and page-builder data stay
exactly as they were, so you can move the site back to a root domain, export it,
or switch the plugin off at any time.

#### Features

 * **Automatic subfolder detection** from the Home URL — nothing to configure.
 * **Choose what to fix:** links (`href`), form actions (`action`), images and scripts(`
   src`) and responsive images (`srcset`).
 * **Excluded paths:** keep links that should really leave the site, such as `/shop/`
   on the same domain, untouched.
 * **Manual subfolder** for sites served from a folder by a reverse proxy.
 * **Live link tester** on the settings screen shows exactly what visitors get.
 * **Automatic page-cache clearing** when settings change, for LiteSpeed Cache, 
   WP Rocket, W3 Total Cache, WP Super Cache and SiteGround Optimizer.
 * **Debug comment** for administrators with the number of links fixed on a page.
 * **Site Health** section under Tools  Site Health  Info.
 * **WP-CLI:** `wp subfolder-links status` and `wp subfolder-links test / /about-
   us/`.

#### Good for

 * Theme and template-kit demo sites hosted side by side, e.g. `example.com/kit-
   one/`, `example.com/kit-two/`.
 * Staging copies that live in a subfolder of the live domain.
 * Subdirectory Multisite networks — every subsite gets its own folder automatically.
 * Imported content or page-builder layouts that contain hard-coded `/` links.

#### What it leaves alone

 * Protocol-relative links (`//cdn.example.com/...`) and full URLs.
 * Links that already include the subfolder, and paths you exclude.
 * `data-*` attributes.
 * Admin screens, AJAX, REST API, feeds and the Elementor editor preview.
 * Sites installed at the domain root — the plugin simply stays idle.

#### For developers

 * `vantorix_slf_attributes` — array of attributes to rewrite.
 * `vantorix_slf_excluded_paths` — array of path prefixes to skip.
 * `vantorix_slf_should_run` — return `false` to skip the current request.
 * `vantorix_slf_purge_caches` — action fired after settings change; purge your 
   own cache here.

Example: skip rewriting on one page.

    ```
    add_filter( 'vantorix_slf_should_run', function ( $run ) {
        return is_page( 'landing' ) ? false : $run;
    } );
    ```

## 螢幕擷圖

[⌊Settings → Subfolder Link Fixer: status, attributes, advanced options and the 
live link tester.⌉⌊Settings → Subfolder Link Fixer: status, attributes, advanced
options and the live link tester.⌉[

Settings  Subfolder Link Fixer: status, attributes, advanced options and the live
link tester.

[⌊Before and after: a "/" link on a subfolder site sends visitors to the domain 
root; with the plugin it stays inside the site.⌉⌊Before and after: a "/" link on
a subfolder site sends visitors to the domain root; with the plugin it stays inside
the site.⌉[

Before and after: a “/” link on a subfolder site sends visitors to the domain root;
with the plugin it stays inside the site.

## 安裝方式

 1. Go to Plugins  Add New, search for “Subfolder Link Fixer”, then install and activate.
    Or upload the zip from Plugins  Add New  Upload Plugin.
 2. Open Settings  Subfolder Link Fixer, check the detected subfolder and try a link
    in the tester.
 3. Done. If your cache plugin is one of the supported ones, it is cleared for you 
    when you save.

## 常見問題集

### Does it change my database or page-builder data?

No. Links are rewritten only in the HTML sent to visitors. The plugin stores only
its own settings. Deactivate it and everything is exactly as before.

### My site is at the domain root. Do I need this?

No. When there is no subfolder in your Home URL the plugin does nothing.

### Some links should go to the domain root on purpose.

Add their path to Excluded paths under Advanced, one per line, e.g. `/shop/`. Links
starting with that path are left alone.

### Should I enable src and srcset?

Only if your content has images or scripts with paths like `/wp-content/...` that
break in the subfolder. Links and form actions are enabled by default.

### Does it work with Elementor and other page builders?

Yes. It works on the final HTML, so it does not matter which builder or theme produced
the link. The Elementor editor preview is skipped so editing is not affected.

### Does it work with caching plugins?

Yes. Pages are cached after the links are fixed. LiteSpeed Cache, WP Rocket, W3 
Total Cache, WP Super Cache and SiteGround Optimizer are cleared automatically when
you change settings. For other caches, clear them once yourself.

### How can I check it is working?

Use the tester on the settings screen, turn on the debug comment and view the page
source, or run `wp subfolder-links test /about-us/`.

### Will it slow down my site?

The work is a single pattern replacement on the page output, which is very fast.
With a page cache it runs only when a page is generated.

### Does it work on Multisite?

Yes, on subdirectory networks. Each subsite uses its own folder from its own Home
URL. It can be network-activated.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Vantorix – Subfolder Link Fixer〉的開發相關工作。

參與者

 *   [ Vantorix ](https://profiles.wordpress.org/itsrakibroni/)

[將〈Vantorix – Subfolder Link Fixer〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/vantorix-subfolder-link-fixer)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/vantorix-subfolder-link-fixer/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/vantorix-subfolder-link-fixer/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/vantorix-subfolder-link-fixer/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/vantorix-subfolder-link-fixer/)。

## 變更記錄

#### 1.1.0

 * New: choose which attributes to fix — href, action, src and srcset (responsive
   images).
 * New: excluded paths.
 * New: manual subfolder for reverse-proxy setups.
 * New: page cache is cleared automatically when settings change (LiteSpeed Cache,
   WP Rocket, W3 Total Cache, WP Super Cache, SiteGround Optimizer).
 * New: debug comment for administrators showing how many links were fixed.
 * New: Site Health info section.
 * New: WP-CLI commands `wp subfolder-links status` and `wp subfolder-links test`.
 * Improved: link tester now follows excluded paths and the manual subfolder.
 * Changed: plugin name now uses a plain hyphen, matching other Vantorix plugins.

#### 1.0.0

 * Initial release.

## 中繼資料

 *  版本 **1.1.0**
 *  最後更新 **15 小時前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 5.8 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.1.3**
 *  PHP 版本需求 ** 7.4 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/vantorix-subfolder-link-fixer/)
 * 標籤:
 * [multisite](https://tw.wordpress.org/plugins/tags/multisite/)[relative links](https://tw.wordpress.org/plugins/tags/relative-links/)
   [staging](https://tw.wordpress.org/plugins/tags/staging/)[subdirectory](https://tw.wordpress.org/plugins/tags/subdirectory/)
   [subfolder](https://tw.wordpress.org/plugins/tags/subfolder/)
 *  [進階檢視](https://tw.wordpress.org/plugins/vantorix-subfolder-link-fixer/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/vantorix-subfolder-link-fixer/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/vantorix-subfolder-link-fixer/reviews/)

## 參與者

 *   [ Vantorix ](https://profiles.wordpress.org/itsrakibroni/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/vantorix-subfolder-link-fixer/)