[英]fix subdomain that redirect to the main domain
將站點移至新子域后遇到問題,
每次我進入我的網站時,我都會被定向到子域。 我認為它的 htaccess 問題。
我有 2 個網站,一個在域中,另一個在子域中(以前在主域中)
(子域目錄:public_html/store)| (域目錄:public_html)
子域 htaccess 文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
閱讀這篇文章: https://wordpress.org/support/article/changeing-the-site-url/
此外,您可以通過 phpmyadmin 訪問您的wp_options
表,並將siteurl
和home
更新為新地址。
檢查相應數據庫的 siteurl 和 home 值,因為它們可能都包含子域地址; 將它們替換為所需的域名,保存並查看是否不能解決問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.