.htaccess issues with Wordpress in root directory and separate installation in subdirectory
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开发者_如何学Python 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?
Try setting the RewriteBase
in the .htaccess
file in the subdirectory. E.g.
RewriteBase /v3/wordpress
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
精彩评论