抱歉,已尝试查找此问题的答案,但找不到任何现有线程。我在本地设置了多站点,我使用Xampp,由于一些奇怪的原因,子站点没有创建目录。我可以在网络管理中看到正在创建的站点,但无法访问仪表板,因为子目录不存在,错误403。它的设置是使用子目录,而不是子域。我不确定这是否有用,但这是我从apache错误日志中得到的。请记住,站点名称上没有无效字符,没有特殊字符,甚至没有空格,只有字母字符。
[Fri May 13 01:01:58.614772 2016] [core:error] [pid 70836:tid 1716] (20024)The given path is misformatted or contained invalid characters: [client ::1:65164] AH00127: Cannot map GET /multisite/wordpress/network/wp-admin/ HTTP/1.1 to file
[Fri May 13 01:27:40.071626 2016] [core:error] [pid 70836:tid 1704] (20024)The given path is misformatted or contained invalid characters: [client ::1:49674] AH00127: Cannot map GET /multisite/wordpress/test1/wp-admin/ HTTP/1.1 to file, referer: http://localhost/multisite/wordpress/wp-admin/network/sites.php
[Fri May 13 01:27:47.716878 2016] [core:error] [pid 70836:tid 1740] (20024)The given path is misformatted or contained invalid characters: [client ::1:49675] AH00127: Cannot map GET /multisite/wordpress/test1/wp-admin/ HTTP/1.1 to file
[Fri May 13 01:28:21.030191 2016] [core:error] [pid 70836:tid 1728] (20024)The given path is misformatted or contained invalid characters: [client ::1:49714] AH00127: Cannot map GET /multisite/wordpress/test1/wp-admin/ HTTP/1.1 to file, referer: http://localhost/multisite/wordpress/wp-admin/network/sites.php
[Fri May 13 01:41:40.543810 2016] [core:error] [pid 70836:tid 1740] (20024)The given path is misformatted or contained invalid characters: [client ::1:50319] AH00127: Cannot map GET /multisite/wordpress/test2/wp-admin/ HTTP/1.1 to file, referer: http://localhost/multisite/wordpress/wp-admin/network/sites.php
[Fri May 13 01:55:10.722134 2016] [core:error] [pid 70836:tid 1704] (20024)The given path is misformatted or contained invalid characters: [client ::1:50884] AH00127: Cannot map GET /multisite/wordpress/site1/wp-admin/ HTTP/1.1 to file, referer: http://localhost/multisite/wordpress/wp-admin/network/sites.php
[Fri May 13 02:13:51.948250 2016] [core:error] [pid 70836:tid 1716] (20024)The given path is misformatted or contained invalid characters: [client ::1:51712] AH00127: Cannot map GET /multisite/wordpress/check/wp-admin/ HTTP/1.1 to file, referer: http://localhost/multisite/wordpress/wp-admin/network/site-new.php?id=6
[Fri May 13 02:23:58.439305 2016] [core:error] [pid 70836:tid 1716] (20024)The given path is misformatted or contained invalid characters: [client ::1:52103] AH00127: Cannot map GET /multisite/wordpress/test3/wp-admin/ HTTP/1.1 to file, referer: http://localhost/multisite/wordpress/wp-admin/network/site-new.php?id=7
谢谢!
.htaccess
文件(来自注释中的pastebin)
RewriteEngine On
RewriteBase /multisite/wordpress/
RewriteRule ^index\\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) A:/MyProjects/JunRoot/Multisite/wordpress/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\\.php)$ A:/MyProjects/JunRoot/Multisite/wordpress/$2 [L]
RewriteRule . index.php [L]