[WordPress] 外掛分享: PathGuard Redirects

首頁 › 外掛目錄 › PathGuard Redirects
WordPress 外掛 PathGuard Redirects 的封面圖片
全新外掛
安裝啟用
—
尚無評分
32 天前
最後更新
—
問題解決
WordPress 5.8+ PHP 7.4+ v1.1.0 上架:2026-05-21

內容簡介

PathGuard Redirects 是一款輕量級且開發者友好的外掛,讓網站管理員能夠封鎖 WordPress 網站上的任何相對 URL,並控制訪客訪問時的行為。

【主要功能】
• 封鎖任意數量的相對路徑
• 自訂重定向動作:自訂 URL 或 404 頁面
• 預設排除管理員,確保其可訪問性
• 一鍵訪問設定選項
• 支援 URL 編碼路徑的解碼
• 變更規則時自動清除頁面快取

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「PathGuard Redirects」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

PathGuard Redirects is a lightweight, developer-friendly plugin that lets site administrators block any relative URL on their WordPress site and control exactly what happens when a visitor tries to access it.
How it works
Add the relative paths you want to block (one per line) and choose what should happen when someone visits them:

Custom URL redirect — send visitors to any destination URL with a 302 redirect.
404 Not Found — serve your theme’s native 404 page with a proper HTTP 404 status header (no redirect, the URL stays the same).

Key features

Block any number of relative paths (e.g. /secret-page/, /members-only/).
Choose the redirect action per-site: custom URL or 404 page.
Exclude Admins — logged-in administrators are bypassed by default so they always have access. The option can be unchecked to restrict admins too.
One-click access via the Settings link on the Plugins list page.
Settings are kept when the plugin is deactivated and removed from the database when it is deleted.
Paths are matched with or without a trailing slash and regardless of case — /secret-page, /secret-page/ and /Secret-Page/ all match.
URL-encoded paths are decoded before matching, preventing bypass attempts like /%73ecret-page/. Non-ASCII paths (e.g. /café/) are supported.
Full URLs pasted into the list are converted to paths on save.
Page caches are purged when the rules change (WP Super Cache, WP Rocket, W3 Total Cache, LiteSpeed Cache; other caches can use the pathguard_redirects_rules_updated action).

Security

CSRF protection on every save using WordPress nonces.
Strict capability check (manage_options) before processing any form data.
All input is sanitised (sanitize_text_field, esc_url_raw, sanitize_key).
All output is escaped (esc_textarea, esc_attr, esc_html_e).
The redirect destination can only be set by administrators; visitors cannot influence where they are sent.

文章
Filter
Mastodon