WordPress.org

Ready to get started?Download WordPress

Forums

Faked Folders error (htaccess? modrewrite?) (4 posts)

  1. AuntiAlias
    Member
    Posted 9 years ago #

    I've been creating a test WP site at a domain which has pre-existing static content that will (eventually) be subsumed into the WP site if all goes to plan.
    But I haven't been able to get Faked Folder to properly redirect to folders/directories I create.
    Once I create a faked folder, the redirect says "no posts match criteria" or the page that loads is the default (index) page for the top level of the domain.
    Here is my site structure:
    http://www.domain.com/
    top level of domain, containing a number of pre-existing
    (.htaccess file with lots of redirects from old blah.shtml files to new blah.php format. I'm not touching this .htaccess file for this test, nor allowing write access to them.)
    http://www.domain.com/wp/
    (.htaccess file with necessary write permissions that FakedFolders uses)
    location of wp and, of course, wp's index.php file.
    For my test, I created two draft posts, and placed them inside my test FakedFolder (the name of which I changed into various permutations, described later):
    about [set to index]
    resume [slug: resume]
    For all cases, I've set the rewrite rules to Thorough
    Test 1: I have tried to create faked folders that already exist in the site structure, e.g.,
    http://www.domain.com/about/ = (goes to pre-existing static index.php)
    http://www.domain.com/about/resume =(result 404)
    Note: I later realized that FF doesn't do that, it appends the /wp/ directory where WordPress resides. But before I realized that, also I tried the following:
    Test 2: I adding the /wp/ directory to the FakedFolder name /wp/about/:
    http://www.domain.com/wp/about/ = sorry no posts matched your criteria
    http://www.domain.com/wp/about/resume = 404
    It was at this point that I realized the automatic appending of /wp/ :
    In the WP-Admin interface, if I clicked a link to either the folder or to the individual posts, the url changed to add a second/wp/ directory. Here are the results:
    http://www.domain.com/wp/wp/about/: (displays index page of site [www.domain.com/index.php] at the /wp/wp/about/ url)
    http://www.domain.com/wp/wp/about/resume/ = same top level page result.
    Test 3: I changed the Faked Folder directory name to just /about/ :
    http://www.domain.com/wp/about/ = sorry, no posts match your criteria
    http://www.domain.com/wp/about/resume = displays top level index page of site. (that is, http://www.domain.com/index.php, but at the /wp/about/resume url.)
    Here's the mod-rewrite rules that went into the .htaccess file in the /wp/ directory:
    # BEGIN FAKED FOLDERS RULES
    RewriteRule ^about/resume/?$ /index.php ?static=true&p=5 [QSA]
    RewriteRule ^about/?$ /index.php?static=true&p=6 [QSA]
    # END FAKED FOLDERS RULES

    Why does the Rewrite to /index.php begin with index.php and not /wp/index.php etc.? (hmmm. never mind, I tried manually changing the .htaccess file to change the above-italicized to /wp/index.php and got a Faked Folders fatal error when attempting to load domain.com/wp/about/resume .
    What's going on here?
    Should I be using a different .htaccess file (at top of domain)?
    Any other ideas?
    I'm using:
    WordPress 1.2.1
    Exhibit 1.1d

  2. tr909
    Member
    Posted 9 years ago #

    the /wp-admin/options-permalink.php is a nice helping tool to make your mod_rewrite rules, make sure you have RewriteEngine on and RewriteBase /wp before defining rules.

  3. AuntiAlias
    Member
    Posted 9 years ago #

    tr909,
    But what I am trying to understand is--- what is going wrong with my setup as it is? Why is FakedFolders broken?
    Are the rules generated by FakedFolders the reason that it's not working? In other words, I'm all for using the wp-admin/options-permalink section of the site, but I do not yet know what to do there... what will fix my problem.

  4. wersh
    Member
    Posted 9 years ago #

    I fought with the issue of it redirecting to /index.php as well. It's hardcoded in the plugin. If you want it to automatically generate .htaccess rules for /wp/index.php, then you'll have to search for the places where /index.php?static appears in the plugin file (there are four spots) and manually change them to /wp/index.php?static. Or at least, that's what I ended up doing to get the .htaccess rules to work. *shrug*

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.