WordPress.org

Ready to get started?Download WordPress

Forums

calling wordpress from outside (2 posts)

  1. phillipcc
    Member
    Posted 7 years ago #

    Hi, I'm calling wordpress from outside wordpress directory and something goes wrong when I switch to permalink.
    This is my structure:
    http://mysite/blog <---- blog powerd by wordpress
    http://mysite/index.php

    WordPress configuration:
    Both "wordpress" and "blog" directory are http://mysite/blog

    Now in my root directory (http://mysite/index.php) I'm querying the wordpress for my last post title. To do that I include the require_once('blog/wp-blog-header.php') in the http://mysite/index.php to enable me to use the wordpress functions.

    Till here everything works fine, but when I switch to permalinks the problems get to start. For user perspective everything works fine, but when I check the headers they all come with 404 error code (googlebot doesn't like this).

    What's the problem with permalinks that it causes the 404 error but page stills displays? Can't I include the wp-blog-header.php from outsite the wordpress directory? What am I doing wrong?

  2. drmike
    Member
    Posted 7 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags