
內容簡介
定義你的網站允許的路由(Allowed Routes),所有其他路由將會返回 404 錯誤。固定鏈接 (Permalinks) 將會被覆蓋。
登入、後端路由和本地文件(例如 wp-login.php)始終可用以防止鎖定。
啟用後,還應該刪除所有頁面緩存以防止不必要的路由行為。
使用案例:
完全控制所有永久鏈接
防止不必要的搜索引擎索引
確保沒有自定義文章類型添加不必要的永久鏈接
無需前端
重要提示:
路由覆蓋了永久鏈接,並且工作方式類似於白名單。只有輸入正確的路由才會繼續訪問。在用於生產環境之前,應該先測試路由
請勿同時使用多個路由或重定向外掛
啟用或禁用路由後,請勿忘記刪除所有頁面緩存,以防止不必要的路由行為
行為:
使用的協議 (HTTP 或 HTTPS) 將被忽略
GET 參數將被忽略
路由區分大小寫
語法 / 通配符:
路由 / 允許訪問首頁(勾選 "Allow index page" 复选框)
通配符 * 允許包含任意值的單個術語(例如 category//page/)
通配符 ** 允許所有可能的術語組合(例如 category/**)此通配符僅允許在路由結尾使用
通配符只允許作為完整術語使用。 正確:/foo//bar/** 錯誤:/foo/ba/test**
外掛標籤
開發者團隊
原文外掛簡介
Define allowed routes for your website, all other routes will return a 404 error. Permalinks will be overruled.
Login, Backend routes and local files (like wp-login.php) are always available to prevent a lockout.
Also delete all your page caches after enabling to prevent unwanted routing behavior.
Use cases:
Absolute control over all permalinks
Prevent unwanted search engine indexing
Be sure no custom post type adds unwanted permalinks
No frontend needed
Important:
The routing overrules permalinks and works like a whitelist. Only correct entered routes will go through. You should test the routing before using on production environments
Be careful using several routing- or redirect plugins at the same time
Do not forget to delete all your page caches after enabling/disabling the routing to prevent unwanting routing behavior
Behaviour:
The used protocol (HTTP or HTTPS) will be ignored
GET params will be ignored
Routes are case sensitive
Syntax / Wildcards:
The route / allows the index page (Check the checkbox \”Allow index page\”)
Wildcard * allows a single term with an arbitrary value (e.g. category//page/)
Wildcard ** permits all possible combinations of terms (e.g. category/**) This wildcard is only allowed at the end of a route
Wildcards are only allowed as complete terms. Correct: /foo//bar/** Wrong: /foo/ba/test**
