Support » Networking WordPress » permanent redirect error on multisite installed in a subdirectory

  • i have a multisite installation in a directory in public_html
    i have activated multinetwork plugin in my multisite
    below is my htaccess in public_html:

    <IfModule mod_rewrite.c>
    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).*) mydomain/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ mydomain/$2 [L]
    RewriteRule . index.php [L]
    # END WordPress

    below is my htaccess in mydomain folder(in which wp is installed)

    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon image/webp application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
    <FilesMatch “\.(html|htm|rtf|rtx|svg|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|TXT|XSD|XSL|XML)$”>
    <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    </FilesMatch>
    <FilesMatch “\.(bmp|class|doc|docx|eot|exe|ico|webp|json|mdb|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|WEBP|JSON|MDB|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$”>
    <IfModule mod_headers.c>
    Header unset Last-Modified
    </IfModule>
    </FilesMatch>
    # END W3TC Browser Cache
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /mydomain/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /mydomain/index.php [L]
    </IfModule>
    # END WordPress

    below is my index.php in public_html :

    <?php
    /**
    * Front to the WordPress application. This file doesn’t do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define(‘WP_USE_THEMES’, true);

    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . ‘/mydomain/wp-blog-header.php’ );

    below is my index.php in mydomain folder(in which wp is installed)

    <?php
    /**
    * Front to the WordPress application. This file doesn’t do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define(‘WP_USE_THEMES’, true);

    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );

    wp-config in mydomain folder is:

    <?php
    /** Enable W3 Total Cache */
    define(‘WP_CACHE’, true); // Added by W3 Total Cache

    // BEGIN iThemes Security – Do not modify or remove this line
    // iThemes Security Config Details: 2
    define( ‘DISALLOW_FILE_EDIT’, true ); // Disable File Editor – Security > Settings > WordPress Tweaks > File Editor
    // END iThemes Security – Do not modify or remove this line
    /**
    * The base configuration for WordPress
    *
    * The wp-config.php creation script uses this file during the
    * installation. You don’t have to use the web site, you can
    * copy this file to “wp-config.php” and fill in the values.
    *
    * This file contains the following configurations:
    *
    * * MySQL settings
    * * Secret keys
    * * Database table prefix
    * * ABSPATH
    *
    * @link https://codex.wordpress.org/Editing_wp-config.php
    *
    * @package WordPress
    */
    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ”);
    /** MySQL database username */
    define(‘DB_USER’, ”);
    /** MySQL database password */
    define(‘DB_PASSWORD’, ”);
    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);
    /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’, ‘utf8’);
    /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’, ”);
    /**#@+
    * Authentication Unique Keys and Salts.
    *
    * Change these to different unique phrases!
    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define(‘AUTH_KEY’, ”);
    define(‘SECURE_AUTH_KEY’, ”);
    define(‘LOGGED_IN_KEY’, ”);i have deleted these values for security purpose
    define(‘NONCE_KEY’, ”);
    define(‘AUTH_SALT’, ”);
    define(‘SECURE_AUTH_SALT’, ”);
    define(‘LOGGED_IN_SALT’, ”);
    define(‘NONCE_SALT’, ”);
    /**
    * Other customizations.
    */
    define(‘FS_METHOD’,’direct’);define(‘FS_CHMOD_DIR’,0755);define(‘FS_CHMOD_FILE’,0644);
    define(‘WP_TEMP_DIR’,dirname(__FILE__).’/wp-content/uploads’);
    /**
    * Turn off automatic updates since these are managed upstream.
    */
    define(‘AUTOMATIC_UPDATER_DISABLED’, true);
    /**#@-*/
    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each
    * a unique prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = ‘wp_’;
    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    *
    * For information on other constants that can be used for debugging,
    * visit the Codex.
    *
    * @link https://codex.wordpress.org/Debugging_in_WordPress
    */

    define(‘WP_DEBUG’, false);
    define( ‘WP_ALLOW_MULTISITE’, true );
    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, false);
    define(‘DOMAIN_CURRENT_SITE’, ‘mydomain.com’);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);

    /* That’s all, stop editing! Happy blogging. */
    /** Absolute path to the WordPress directory. */
    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . ‘wp-settings.php’);

    in phpmyadmin
    wp_site— table my main site is mydomain.com , id is 1 and path is ‘/'(excluding the single quotes)

    wp_sitemeta—table id 1 site has siteurl https://mydomain.com/mydomain

    wp_options table is siteurl https://mydomain.com/mydomain

    in godaddy installation pannel it shows
    http://www.mydomain.com/mydomain/
    and
    http://www.mydomain.com/mydomain/wp-admin/

    When problem occured:
    i was testing with theme my login plugin
    it was network activated from main site
    and also it was network activated from my network site
    when i deactivated it on my network site
    and tried to go to main site it started giving permanent redirect errors

    after that searching for the possible solutions on the internet what i did was:
    i deactivated all plugins by changing their name
    it includes the multinetwork plugin and a force ssl plugin also.
    i renamed them back to originals(i don’t think it reactivated them again)
    i changed the name of plugins folder but nothing happens i renamed it back
    now i don’t have access to my login and ftp because it is permanently redirected
    all i have access is c pannel
    i know there is problem with htaccess or wp-config
    or with www or /
    what i am missing i don’t know

    please help me it’s urgent

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.