admin管理员组文章数量:1279125
i have a wordpress 5.8.1 installation on Windows 10 with a multisite configuration locally (localhost) and i want to access a php app in an app folder from all subdomains i created. (There are three at total) e.g: localhost/site1 localhost/site2 localhost/site3
What i want to do is for every site (site1,site2,site3) is that they can access the app folder e.g:
localhost/site1/app
localhost/site2/app
localhost/site3/app
How do i procede to do so? Should i put the app folder at wordpress' root folder or another folder? And what should i do so that every subdomain has access to the app folder? I really don't know how to procede so that it works like i want. If anyone can point me to the right direction this would help me very much.
here's what i added to my default wordpress wp-config file:
define('WP_ALLOW_MULTISITE', true);
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
define( 'DOMAIN_CURRENT_SITE', 'localhost' );
define( 'PATH_CURRENT_SITE', '/wordpress/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
and here's my .htaccess file:
# BEGIN s2Member GZIP exclusions
<IfModule rewrite_module>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
I hope that i'm on the right track, if anyone can help me this would be good.
本文标签:
版权声明:本文标题:localhost - How to make a php script(app) accessible to all wordpress subdomains in a wordpress multisite configuration? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741246511a2364978.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论