• Resolved serhio

    (@serhio)


    Hello. Please help

    I want to redirect users but me to a maintenance page momentanly.
    I have the following in my .htaccess

    Options +FollowSymlinks
    RewriteEngine on
    
    RewriteCond %{REQUEST_URI} !/maintenance.html$
    
    # here filter the developer's IP/
    RewriteCond %{REMOTE_HOST} !^xx\.xx\.xx\.xx
    
    RewriteRule $ /maintenance.html [R=302,L]

    So, now I install the multisite WP, and need to add the .htaccess like this:

    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]

    How can I combine this rules in order to keep my temporary redirect?

    I will comment extra rules after my site will be OK.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Maintenance redirect and rules’ is closed to new replies.