Support » Fixing WordPress » WordPress in sub-folder but won’t appear and seems to auto-redirect to root

Viewing 5 replies - 1 through 5 (of 5 total)
  • maestro42


    In the settings page – where it says to type in the address of your blog is it written as: -or-

    (it should be the latter)

    Let’s start there.



    It’s definitely the latter. I’ve double checked that. Both the WP address and Blog address are the latter. I even tried making it something different and putting the index.php in a different directory and nothing changed it.



    Don’t know if this helps, but I did a server head test and the response was:

    #1 Server Response:
    HTTP Status Code: HTTP/1.1 301
    Date: Tue, 05 Aug 2008 12:35:23 GMT
    Server: ConcentricHost-Ashurbanipal/1.8 (XO(R) Web Site Hosting)
    Content-type: text/html;
    Connection: close
    X-Powered-By: PHP/4.4.7
    Redirect Target:

    So it’s redirecting for some reason, but I don’t know exactly what all of this means.

    Just FYI, for all those who use XO hosting… here’s the fix they gave us:

    In the wp-settings.php file, replace

    // Fix for IIS, which doesn’t set REQUEST_URI
    if ( empty( $_SERVER[‘REQUEST_URI’] ) ) {

    // IIS Mod-Rewrite
    if (isset($_SERVER[‘HTTP_X_ORIGINAL_URL’])) {
    // IIS Isapi_Rewrite
    else if (isset($_SERVER[‘HTTP_X_REWRITE_URL’])) {
    // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)
    if ( isset($_SERVER[‘PATH_INFO’]) ) {

    // Append the query string if it exists and isn’t null
    if (isset($_SERVER[‘QUERY_STRING’]) && !empty($_SERVER[‘QUERY_STRING’])) {

    // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests
    if ( isset($_SERVER[‘SCRIPT_FILENAME’]) && ( strpos($_SERVER[‘SCRIPT_FILENAME’], ‘php.cgi’) == strlen($_SERVER[‘SCRIPT_FILENAME’]) – 7 ) )

    // Fix for Dreamhost and other PHP as CGI hosts
    if (strpos($_SERVER[‘SCRIPT_NAME’], ‘php.cgi’) !== false)


    if(isset($_SERVER[‘QUERY_STRING’]) && !empty($_SERVER[‘QUERY_STRING’])) {
    } else {

    This helped me to solve a similar issue with the sun java webserver 7 (SAMP environment using the Cool Stack package). Thank you very much guys!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WordPress in sub-folder but won’t appear and seems to auto-redirect to root’ is closed to new replies.