簡體   English   中英

Wordpress 多站點 Htaccess 覆蓋

[英]Wordpress Multisite Htaccess Overwrite

我正在嘗試重寫一個基本的文件夾,以覆蓋 Wordpresses 默認的 htaccess。

我需要一個位於 domain.com/community/sso/index.php 的文件夾來強制解析為 domain.com/community/sso

這是我最近嘗試的:

Options -MultiViews
RewriteEngine On

RewriteRule ^community  - [L]


RewriteBase /
RewriteCond %{REQUEST_FILENAME} .*\.(jpeg|jpg|gif|png)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /public/404.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /sso/index.php [L]
</IfModule>```

您能否嘗試在此處更改您當前規則的順序(基於您的節目規則),無法測試它。 請確保在測試您的 URL 之前清除瀏覽器緩存。

Options -MultiViews
RewriteEngine On
RewriteRule ^community  - [NC,L]

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /sso/index.php [L]

RewriteCond %{REQUEST_FILENAME} .*\.(jpeg|jpg|gif|png)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /public/404.php [L]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM