Discover Centmin Mod today
Register Now

Wordpress Wordpress Multisite Rewrite Rules

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

  1. ivanc82

    ivanc82 New Member

    24
    2
    3
    Dec 1, 2015
    Ratings:
    +4
    Local Time:
    6:18 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,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:18 PM
    Nginx 1.13.x
    MariaDB 5.5