• I have installed wordpress on an IIS server in a subdirectory called wordpress. I have followed instructions on the following page to point the domain to the subdirectory to remove wordpress from the url. This has worked perfectly, and I have set the permalinks correctly as well.

    When you go to the front page of my site (link) it displays perfectly, but when you start navigating around the content, under the thin black line at the top of the page, shifts down. This is occurring in Chrome and IE, but not Firefox.

    You will see if you place wordpress in the url and bypass the pointing it display perfectly for all pages. I have included the code of the .htaccess file and the .index.php file below for you, along with the web.config.

    .htaccess

    # 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

    index.php

    <?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__ ) . '/wordpress/wp-blog-header.php' );

    web.config

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <directoryBrowse enabled="false"/>
            <defaultDocument>
                <files>
                    <clear />
                    <add value="wordpress/index.php" />
                </files>
            </defaultDocument>
        </system.webServer>
    </configuration>

    Any help would be greatly appreciated. If you need more information let me know.

    David

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Subdirectory Pointing Causing Space in Header’ is closed to new replies.