我目前正在为客户开发一个网站,我正在创建的网站将出售给其他公司使用,具体操作如下:
- 收到付款
- 管理员登录 123-reg 控制面板并创建一个新的数据库。
- 然后管理员登录网站控制面板并开始创建网站的新实例。
- 例如,源文件被复制到新目录
/new-instance/
中。
- 用户应该能够从
new-instance.website.co.uk
访问它
现在,由于一些问题,例如在 100 个子域之后,他们必须向 123-reg 支付更多费用,我建议我们只需设置一组 .htaccess 规则,将用户从 new-instance.website.co.uk
重定向到 website.co.uk/new-instance/
现在我面临的问题是 我不知道
- 应该使用的重写规则,我目前正在使用这个发现 这里
- 123-reg 似乎启用了所有子域,我无法访问 123-reg 面板,所以我不知道他们是否能够将其关闭,但由于对此事实上,在控制面板中未设置的任何子域中输入只会显示网站主页,因此我不知道 catch-all 是否正在停止 .htaccess 工作,或者是否是 .htaccess 文件中的规则。
非常感谢所有相关答案。谢谢。
I am currently working on a website for a client, the website I'm creating is then to be sold on to other companies to use and is done so like this:
- Payment is recieved
- Admin logs into 123-reg control panel and creates a new database.
- Admin then logs into a website control panel and begins to create a new instance of the website.
- The source filesare copied over to a new directory
/new-instance/
for example.
- The user should be able to access it from
new-instance.website.co.uk
Now due to some issues such as the fact after 100 sub domains they have to pay more money to 123-reg I suggested we simply set up a set of .htaccess rules to redirect the user from new-instance.website.co.uk
to website.co.uk/new-instance/
Now the issues I face are that
- I have no idea on the rewrite rule I should be using, I'm currently using this one found here
- 123-reg seems to have catch-all sub-domains enabled, I have no access to the 123-reg panel so I don't know if they are able to turn it off, but due to this fact typing in any sub-domain that has not been set up in their control panel just shows the websites main page, therefore I have no idea if catch-all is stopping .htaccess working or if its the rules within the .htaccess file.
All relevant answers are much appreciated. Thanks.
发布评论
评论(2)
下面的支持文章解释了如何通过 DNS 设置子域。
独立的子域产品不是您所需要的。
如何将子域指向 IP 地址?
http://www.123-reg.co.uk/support/answers/Domains/Domain-Configuration/how-can-i-point-a-subdomain-to-an-ip-address-第2173
章
如有任何问题,请告诉我支持票号。
http://www.123-reg.co.uk/support/
瑞奇
The below support article explains how to setup sub domains via DNS.
The stand alone subdomain product is not what you require.
How can I point a subdomain to an IP address?
http://www.123-reg.co.uk/support/answers/Domains/Domain-Configuration/how-can-i-point-a-subdomain-to-an-ip-address-2173/
All you need to do is setup the as described in the article above and then code the htaccess file accordingly.
Any problems please let me know the support ticket number.
http://www.123-reg.co.uk/support/
Ricky
我代表 123-reg 工作。
您无需为子域 DNS 托管付费。
您可以通过控制面板的管理 DNS 部分添加 DNS 条目
问候,
Ricky
I work on behalf of 123-reg.
You do NOT need to pay for sub domain DNS hosting.
You can add DNS entries via the Manage DNS section of the control panel
Regards,
Ricky