0
votes

I have a working installation of Wordpress in top-level directory. I'm trying to place a separate Wordpress installation - a kind of "development environment" with its own code files and database, in a subdirectory.

At the moment, all URL's in the subdirectory have a 404 page not found error.

.htaccess for subdirectory:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /v3
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
</IfModule>

.htaccess for main directory:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^laddercapital\.com$ [NC]
RewriteRule ^(.*)$ http://www.laddercapital.com/$1 [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/?v3/
RewriteRule . /index.php [L]
</IfModule>

Ideas?

2
Was having a very similar problem myself here: serverfault.com/questions/336511/… Would be great to see an answer here...datasn.io
OMG, this question was 9 months ago, I thought it was just now.....shooooot.datasn.io

2 Answers

1
votes

Try setting the RewriteBase in the .htaccess file in the subdirectory. E.g.

RewriteBase /v3/wordpress
0
votes

Please try this for the .htaccess in the subdirectory:

# BEGIN WordPress
RewriteEngine On
RewriteBase /v3/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /v3/index.php [L]
# END WordPress

Source: WP 404 not found subdirectory