Faked Folders error (htaccess? modrewrite?)
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:
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.)
(.htaccess file with necessary write permissions that FakedFolders uses)
location of wp and, of course, wp’s
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?
- The topic ‘Faked Folders error (htaccess? modrewrite?)’ is closed to new replies.