Problem running wordpress from a directory
-
I have wordpress installed in a directory (/fld/) but I am running it from the root.
My problem is that plugins and core wordpress functions are all inserting the directory /fld/ into the page urls – so for example recent posts widgets and the default wordpress menu are taking people to the wrong url.
I would expect them to go to https://www.site/page/ but they are all going to https://www.site/fld/page. I have duplicate content issues because both versions of the page are viewable and indexable. What I want is for the /fld/ directory to be invisible to the viewer.My first question is – should this be happening, is this the default wordpress behaviour or have I done something wrong? (Second question is what have I done wrong!)
My Settings
1. Admin/settings/general: both the wodpress and site address end with /fld/2. Index.php require lines say the following;
In /fld/ = require(‘./wp-blog-header.php’);
In the root = require(‘./fld/wp-blog-header.php’);3. htaccess
In the /fld/ directory
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /fld/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /fld/index.php [L]
</IfModule>
# END WordPressIn the root
# 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
- The topic ‘Problem running wordpress from a directory’ is closed to new replies.