admin管理员组文章数量:1130349
I have a slightly different question to the usual 'how to put WP into a subfolder'
I have two completely separate variants of the same WP site online - a live and a test one. The sites are in separate folders /livesite and /testsite on my hosted webserver.
If people browse the base domain I want them to access the live WP site in the /livesite folder but without the /livesite/ appearing in the browser URL.
If people browse the test domain (ie domain/testsite) then I want them to access the test site WP in the /testsite folder and I do want the /testsite/ to appear in the URLs (as confirmation that some nastly link hasn't accidentally redirected them from the test to the live site)
Is this possible? I have the live site set up with the (below) .htaccess but am unsure how to redirect /testsite requests appropriately - of even if I need to do this - will the current .htaccess ignore requests to professionalhypnotherapynetwork/testsite ?
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?professionalhypnotherapynetwork$
RewriteCond %{REQUEST_URI} !^/livesite/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /livesite/$1
RewriteCond %{HTTP_HOST} ^(www.)?professionalhypnotherapynetwork$
RewriteRule ^(/)?$ livesite/index.php [L]
</IfModule>
I have a slightly different question to the usual 'how to put WP into a subfolder'
I have two completely separate variants of the same WP site online - a live and a test one. The sites are in separate folders /livesite and /testsite on my hosted webserver.
If people browse the base domain I want them to access the live WP site in the /livesite folder but without the /livesite/ appearing in the browser URL.
If people browse the test domain (ie domain/testsite) then I want them to access the test site WP in the /testsite folder and I do want the /testsite/ to appear in the URLs (as confirmation that some nastly link hasn't accidentally redirected them from the test to the live site)
Is this possible? I have the live site set up with the (below) .htaccess but am unsure how to redirect /testsite requests appropriately - of even if I need to do this - will the current .htaccess ignore requests to professionalhypnotherapynetwork/testsite ?
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?professionalhypnotherapynetwork$
RewriteCond %{REQUEST_URI} !^/livesite/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /livesite/$1
RewriteCond %{HTTP_HOST} ^(www.)?professionalhypnotherapynetwork$
RewriteRule ^(/)?$ livesite/index.php [L]
</IfModule>
本文标签: htaccessWordpress sites in subfolders
版权声明:本文标题:htaccess - Wordpress sites in subfolders 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749219947a2334786.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论