Support » Networking WordPress » can't acces login page on subfolder install

Viewing 15 replies - 1 through 15 (of 19 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    So I used this boilerplate on the .htacces file in the subfolder:

    What subfolder? They’re supposed to be virtual…

    photocoen

    (@photocoen)

    I installed WP in a subfolder on my server. And put a .htacces file in the root and in the subfolder.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    EITHER the multisite is installed in http://www.landcruisingadventure.com or it’s installed in http://www.landcruisingadventure.com/wplca

    It’s not both. Which one is it?

    (Note: I do not mean where is your SUB site, I mean where is the root Multisite installed?)

    photocoen

    (@photocoen)

    Your right, the site is installed in http://www.landcruisingadventure.com/wplca

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    So WP is installed in http://www.landcruisingadventure.com/wplca but you set it up to run out of http://www.landcruisingadventure.com/ (i.e. giving WP it’s own directory)

    Your .htaccess is wrong.

    # BEGIN WordPress
    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]
    # END WordPress

    And even then, RewriteBase / may need to be RewriteBase /wplca/

    photocoen

    (@photocoen)

    Great!

    You saved me a lot of headaches!

    Adventurous greetings,
    Coen

    photocoen

    (@photocoen)

    hmmmm maybe I shouted to early… I can log-in now. But all the posts are not accesible by the public.

    I am getting a:

    Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.

    So I am back to square one…….

    I have this as the .htacces in the subfolder:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /wplca/
    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]
    # END WordPress

    How do I get rid of the redirect error?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Looks like landcruisingadventure.com/wplca is being redirected to http://www.landcruisingadventure.com/wplca

    Which do you have in wp-config.php?

    photocoen

    (@photocoen)

    I don’t have that set in the wp-config.php file.

    But under the general settings I have this:

    WordPress Address (URL): http://www.landcruisingadventure.com/wplca
    Site Address (URL): http://www.landcruisingadventure.com

    Or do you mean something else?

    photocoen

    (@photocoen)

    If I update the permalink structure at the Permalink Settings tab of the settings, it shows the posts allright, but I know from previous times this is only a matter of time it’s going to show the redirect errors again….

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    I mean something else. Look in your wp-config.php for something like this:

    define( 'DOMAIN_CURRENT_SITE', 'YOURDOMAIN.COM' );

    What is yours? 🙂

    But if updating the permalinks works then the odds are you have a plugin that’s breaking it :/ Something’s resetting permalinks in a bad way.

    photocoen

    (@photocoen)

    I don’t have anything that resembles

    define( ‘DOMAIN_CURRENT_SITE’, ……..

    in my wp-config.php . Should there be that?

    updating the permalinks works only temporary…. if a plugin is causing that, how would I check that?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    What DO you have in wp-config.php for your Multisite defines?

    photocoen

    (@photocoen)

    Nothing I guess. This is my wp-config.php

    <?php
    /**
     * The base configurations of the WordPress.
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information
     * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     *
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'xxxxxx');
    
    /** MySQL database username */
    define('DB_USER', 'xxxxxx');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'xxxxxx');
    
    /** 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',         'xxxxxx');
    define('SECURE_AUTH_KEY',  'xxxxxx');
    define('LOGGED_IN_KEY',    'xxxxxx');
    define('NONCE_KEY',        'xxxxxx);
    define('AUTH_SALT',        'xxxxxx');
    define('SECURE_AUTH_SALT', 'xxxxxx');
    define('LOGGED_IN_SALT',   'xxxxxx');
    define('NONCE_SALT',       'xxxxxx');
    
    /**#@-*/
    
    /**
     * 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_';
    
    /**
     * WordPress Localized Language, defaults to English.
     *
     * Change this to localize WordPress. A corresponding MO file for the chosen
     * language must be installed to wp-content/languages. For example, install
     * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
     * language support.
     */
    define('WPLANG', '');
    
    /**
     * 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.
     */
    define('WP_DEBUG', false);
    
    /* 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');
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Well… Okay. That wp-config.php doesn’t have Multisite AT ALL.

    You either are looking at the wrong one, or you never actually set up Multisite. I kind of think this goes back to our difficult sorting out WHERE WP was installed, though.

    Re-read: http://codex.wordpress.org/Create_A_Network#Step_4:_Enabling_the_Network

    See how there are two steps and #1 is to edit the wp-config?

    Without those lines, it’ll never work.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘can't acces login page on subfolder install’ is closed to new replies.