【发布时间】:2014-11-26 07:36:26
【问题描述】:
我有一个运行多个网站的虚拟主机。假设我有 xyz.com,它是这个其他网站下的主要网站,作为插件域运行。
就像我有另一个网站是 xyz2.com,它是插件域。已创建对应域 xyz2.com 的文件夹。
现在的问题是我想添加一些 .htaccess 规则,没有为根网站定义规则。我只想为作为插件域的 xyz2.com 添加规则。
我已将我的 .htaccess 放入文件夹 xyz2.com。这是我写的。
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^(www\.)?xyz2.com\.com$ [NC]
RewriteCond %{THE_REQUEST} /find\.php\?source=([^\s&]+)&destination=([^\s&]+) [NC]
RewriteRule ^ %1-%2.html? [R=302,L,NE]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\s]+)-([^\s]+)?.html$ find.php?source=$1&destination=$2 [L,QSA]
这不起作用我在谷歌上搜索了很多这个问题,但没有任何建议有效。请帮我解决这个问题。
【问题讨论】:
-
不,它工作正常,但它保持不变,没有应用重写规则
标签: php .htaccess web-hosting addon-domain