Get the most out of your Centmin Mod LEMP stack
Become a Member

Wordpress Wordpress Multisite Rewrite Rules

Discussion in 'Blogs & CMS usage' started by ivanc82, Jan 2, 2017.

  1. ivanc82

    ivanc82 New Member

    23
    2
    3
    Dec 1, 2015
    Ratings:
    +4
    Local Time:
    11:15 PM
    1.11.4
    MariaDB 10
    Hi,

    Recently I moved my website to nginx and use centminmod. One of my site is Multisite with subdirectory, i want to know where can i include the rewrite rules previously used in .htaccess like below

    right now when i browse to the /ch/ subdirectory, it will show redirect too many time or show broken site.

    Code:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [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]
    Thank you!
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,175
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    1:15 AM
    Nginx 1.13.x
    MariaDB 5.5