Adding site in subdirectory, Access Forbidden 403 when going to wp-admin
-
I have been having this problem all week. I’ve gone through a lot of forum posts with similar issues, but none of the fixes have worked for me. This is a local site, with subdirectory setup instead of subdomain. My .htaccess file is as follows:
RewriteEngine On RewriteBase /singlesite/ RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1/wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) C:\xampp\htdocs\singlesite/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ C:\xampp\htdocs\singlesite/$2 [L] RewriteRule . index.php [L]
and my DocumentRoot is as follow:
<Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Allow from all </Directory>
The original landing page, https://localhost/singlesite, works fine. Adding a new site, say https://localhost/test, results in a new site without a theme (just text and links), and the dashboard, or wp-admin, leads to a Access Forbidden 403 page.
I figured out that in the Apache error logs there was a “client denied by server configuration” with the following path:
C:/xampp/htdocs/singlesite/testI realized that this path actually does not exist, so as a workaround I copied all files in the singlesite folder into the singlesite/test folder. This allows me to access the sites in full with themes and dashboard.
Any help would be appreciated, all the experts here have done a great job.
- The topic ‘Adding site in subdirectory, Access Forbidden 403 when going to wp-admin’ is closed to new replies.