簡體   English   中英

需要在子域中安裝WordPress Multisite

[英]Need to install WordPress Multisite in Subdomain

我的服務器根目錄中有一個CodeIgniter網站。 該網站確實有很多頁面,大約~2M to ~2.5M頁面以及許多其他功能。 然而; 現在,我為我的主頁開發了一個WordPress多站點,並為我的另一個開發了12個登陸頁面。 我已經使用WPML了。 現在我需要完成以下結構,

domain.com -> My CodeIgniter website.
lp.domain.com -> WordPress multisite main site.
ex1.lp.domain.com to ex11.lp.domain.com -> for my 12 landing page.

現在,當我將WordPress安裝遷移到子域時,它將進入重定向循環。

誰能為我提供一個我可以做到的解決方案?

提前感謝您的幫助

在CI主站點中使用重寫(在CI的重寫腳本之后),

RewriteEngine On
RewriteCond %{HTTP_HOST} (.*)\.domain\.tld$
RewriteCond %{HTTP_HOST} domain\.tld$
RewriteCond %{HTTP_HOST} ^domain\.tld[NC]
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.tld$    
RewriteCond %{HTTP_HOST} !^(lp|subdom1|sub2dom2)\.domain\.tld$ [NC]

然后永久重定向到

 RewriteRule ^(.*) https://www.domain.tld/%1/$1 [L,R=302]

然后在WP中

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

實時示例在此處使用CI,https://www.gsunitedtechnologies.com(子域:https://blog.gsunitedtechnologies.com)和同一主機,並在https://beatthedrumfor.com上具有多站點wp網絡的主機(子域:https :// in.beatthedrumfor。com)

暫無
暫無

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

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