我现在在我的htaccess上有这个:
RewriteEngine on RewriteCond %{REQUEST_URI} !^/www/ RewriteRule (.*) /www/$1/index.php
但我一直都有一个错误页面
我想做的是为客户机注册很多域 只需将他们所有网站的文件存储在我域的www文件夹中名为“their domain.com”的文件夹中。
首先,您将永远无法在URI中找到www,因为URI是index.php之后的所有内容?那么这个URI将是index.php? /这里/is/the.uri/string
我会看一下http_主机
<IfModule mod_rewrite.c> RewriteCond %{HTTP_HOST} !^first-host.com$ [NC] RewriteRule ^(.*)$ http://new-host.com/$1 [L,R=301] #Send 301 so search engines know where to go. </IfModule>