I am trying to install wordpress in a subfolder of an existing wordpress installation. I created a the subfolder /wp
unziped a fresh Wordpress download inside of that directory and added a .htaccess
with the following content:
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
However if I visit mysite.com/wp
I get an error 404 not found. I already tried the following: Restarting Apache and adding the .htaccess
content to the root .htaccess
. But it did not help.
/wp
subdirectory is included in the WordPress config? What happens when you requestexample.com/wp/
(with a trailing slash)? I would expect no difference, however, if you omit the trailing slash then you are relying on mod_dir issuing a 301 redirect to append the trailing slash (which is dependent on theDirectorySlash
directive). And what if you requestexample.com/wp/index.php
directly? Again that avoids mod_dir having to issue an internal subrequest to theDirectoryIndex
. So it's really just ruling our server config issues.example.com/wp/index.php
but I am still redirected to the theme default error 404 page. Also the request in the network tab is showing me error 404 in the header./wp
subdirectory.define('WP_HOME','http://new.spirigarchitektur.ch/wp');
anddefine('WP_SITEURL','http://new.spirigarchitektur.ch/wp');
. But it did not help.