【发布时间】:2016-08-12 16:11:50
【问题描述】:
我有一个像 abc.example.com 这样运行 wordpress 的子域。它的 htaccess 有这个
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
结束 WordPress
如何让我的根域(example.com)完全不使用 wordpress / php?因为我假设 example.com 正在运行我的 node.js 应用程序。
我尝试将第 2 行替换为
RewriteRule / http://localhost:3000/$1 [P,L] but it broke myabc.example.com
【问题讨论】:
-
尝试为您的 node.js 应用使用 Express 或 Connect
-
@RobertBroden 在我在 example.com 上安装 wordpress 之前,我的 node.js 应用程序运行良好,不知道为什么 Express 会出现在这里
标签: php node.js wordpress .htaccess