最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

404 on wordpress multisite Permalink pretty URLs

programmeradmin1浏览0评论

I installed a fresh Wordpress site with multisite enabled on AWS ec2 ubuntu instance. I followed all the instructions during the setup. My .htaccess looks like below

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
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]
</IfModule>

# END WordPress

and wp-config looks like below

define( 'WP_ALLOW_MULTISITE', true );

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'teenjournal.in');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

Only the default plain url structure works in multisite mode. Although in single site mode everything works fine. And adding index.php in the permalink structure works in multisite mode.

index.php/%category%/%postname%/

My site is hosted at Teen Journal

I installed a fresh Wordpress site with multisite enabled on AWS ec2 ubuntu instance. I followed all the instructions during the setup. My .htaccess looks like below

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
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]
</IfModule>

# END WordPress

and wp-config looks like below

define( 'WP_ALLOW_MULTISITE', true );

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'teenjournal.in');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

Only the default plain url structure works in multisite mode. Although in single site mode everything works fine. And adding index.php in the permalink structure works in multisite mode.

index.php/%category%/%postname%/

My site is hosted at Teen Journal

Share Improve this question edited Oct 14, 2019 at 8:59 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Oct 12, 2019 at 18:20 Harish Ninge GowdaHarish Ninge Gowda 101
Add a comment  | 

1 Answer 1

Reset to default 0

Edit file /etc/apache2/apache2.conf and add this

<Directory /var/www/teenjournal.in>
  AllowOverride All
</Directory>
发布评论

评论列表(0)

  1. 暂无评论