如何将 www.domain.com 重写为另一个域的 /www/domain.com/index.php?
我目前的 htaccess 上有这个:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/www/
RewriteRule (.*) /www/$1/index.php
但我不断收到错误页面
我想做的是为客户注册很多域名 并将他们网站的所有文件存储在我的域的 www 文件夹中名为“irdomain.com”的文件夹中。
i have this on my htaccess currently:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/www/
RewriteRule (.*) /www/$1/index.php
but i keep getting an error page
what im trying to do is to register a lot of domains for clients
and just store all their websites' files on a folder named "theirdomain.com" on my domain's www folder.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先你永远不会在URI中找到www,因为URI是index.php之后的所有内容?所以uri将是index.php?/here/is/the.uri/string
我会查看HTTP_HOST
Firstly you will never find www in the URI BEcause the URI is everything after index.php? so the uri will be index.php?/here/is/the.uri/string
I would look at HTTP_HOST