Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jstalewski

    (@jstalewski)

    default htaccess made no difference…

    Thread Starter jstalewski

    (@jstalewski)

    Reinstalling the plugin didn’t fix the warning messages.

    A little more info – I am using htaccess and a root directory index.php file to handle having two different hosts on the same web server (dev & test.)

    My htaccess file at web root looks like this (using generic urls and pretending my stage and live wordpress installs are at /stage/ and /live/):

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    # rule to rewrite dev calls to dev site
    Options +FollowSymLinks
    
    RewriteCond %{HTTP_HOST} dev.mysite.com$ [NC]
    RewriteCond %{REQUEST_URI} !^/stage/.*$
    RewriteRule ^(.*) /stage/$1 [L]
    
    # Rule to rewrite www (or not) calls to www site
    RewriteCond %{HTTP_HOST} ^(www\.)?mysite.com$ [NC]
    RewriteRule %{REQUEST_URI} !^/live/.*$
    RewriteRule ^(.*)$ /live/$1 [L]
    
    # END rewrites

    and my index.php at web root looks like this:

    <?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
     */
     /**  This is added by JES 10/15/15 to address multiple sites on same server issue
     */
     $host = $_SERVER['SERVER_NAME'];
     $site = "stage";
     if(@host == ('www.mysite.com' | 'mysite.com' ))
     	{
     		$site = "live";
     	}
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . '/'. $site .'/wp-blog-header.php' );

    As you can see, I added a bit of php code to the basic WP index.php to make the one index.php work for both not-installed-at-root sites, in order to attempt to follow the wordpress instructions for moving your site to a subdirectory instead of leaving it at web root.

    I am using the permalink config pre-set by the install, by the way. It has, after the site url: /%year%/%monthnum%/%day%/%postname%/

    Perhaps I will try the default htaccess..

    Thread Starter jstalewski

    (@jstalewski)

    Seems to me as though something is missing from my installation – I will try reinstalling the plugin.

Viewing 3 replies - 1 through 3 (of 3 total)