Bitnami / Wordpress Multisite子目录:重定向循环

时间:2013-04-05 21:20:40

标签: wordpress bitnami

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

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

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

以下是我的.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

1 个答案:

答案 0 :(得分: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