dongluoqiu0255 2019-05-24 05:03
浏览 102

Wordpress已安装在根目录中,我也在子目录中安装了wordpress,但问题是子目录URL无法正常工作

Wordpress already Installed in root Directory and I have also installed wordpress in subdirectory, But the problem is subdirectory URL is not working. It always give 404 error

Root

https://boochcraft.com/

Subdirectory URL

https://boochcraft.com/shop

Root Directory .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Sub-directory .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /shop/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./shop/index.php [L]
</IfModule>
# END WordPress
  • 写回答

3条回答 默认 最新

  • drzil26260 2019-05-24 07:57
    关注

    Change the sub-directory ".htaccess" to be the same as the original one, no need to prefix your Rewrite rules with "./shop". Then just continue to "boochcraft.com/shop" to continue setup of the 2nd WP with a separate database. If in any case you already have the "boochcraft.com/shop" WP setup, go the corresponding database in the "wp_options" table and change "home" and "site_url" values to "boochcraft.com/shop".

    评论

报告相同问题?

悬赏问题

  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 正弦信号发生器串并联电路电阻无法保持同步怎么办
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)