3

我正在使用 AWS/Bitnami/Wordpress 堆栈来安装具有子目录结构的 WP 多站点(3.5.1-1)。

我可以创建子站点,但是尝试查看子站点仪表板会导致“重定向循环”。此外,当我查看子站点时,主题/插件似乎已损坏。

我之前安装了多站点没有问题,所以我假设这与 Bitnami 本身有关。我已经搜索了数据库以确认所有站点 URL 都与我读到的相同,这是一个常见的解决方案,但是我仍然面临同样的问题。

这是我的 .htaccess 中的内容:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
4

1 回答 1

2

尝试这个:

删除你的.htaccess文件。

然后编辑/opt/bitnami/apps/wordpress/conf/wordpress.conf并替换所有内容:

<IfVersion < 2.3 >
  NameVirtualHost *:80
</IfVersion>

<VirtualHost *:80>
 ServerAdmin mail@example.com
 DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"

 <Directory "/opt/bitnami/apps/wordpress/htdocs">
   Options +MultiViews +FollowSymLinks
   AllowOverride None
   <IfVersion < 2.3 >
   Order allow,deny
   Allow from all
   </IfVersion>
   <IfVersion >= 2.3>
   Require all granted
   </IfVersion>


  # BEGIN WordPress
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]

  # uploaded files
  RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

  # add a trailing slash to /wp-admin
  RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]
  RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
  RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
  RewriteRule . index.php [L]
  # END WordPress

 </Directory>
</VirtualHost>

然后使用以下命令重新启动 apache:

sudo /opt/bitnami/ctlscript.sh restart
于 2013-06-21T17:53:39.927 回答