简体   繁体   English

xampp htaccess目录到子域

[英]xampp htaccess directory to subdomain

I have XAMPP on my computer and a domain purchased from GoDaddy. 我的计算机上装有XAMPP,并且是从GoDaddy购买的域。 I have set up an A record and I can access it through http://massmailerpro.com/ 我已经建立了A记录,可以通过http://massmailerpro.com/访问它

Now I have one directory that can be accessed at http://massmailerpro.com/cacat . 现在,我可以通过http://massmailerpro.com/cacat访问一个目录。 How can I transform this into cacat.massmailerpro.com with htaccess or, better, with PHP, when a user registers? 当用户注册时,如何使用htaccess或更好的是使用PHP将其转换为cacat.massmailerpro.com?

My massmailerpro.com directs me to my external IP address 79.119.0.11, I intend to buy some Raspberry Pi and host some low cost websites and I need subdomaains. 我的massmailerpro.com将我定向到我的外部IP地址79.119.0.11,我打算购买一些Raspberry Pi并托管一些低成本的网站,并且需要subdomaains。

you can use the settings from httpd-vhosts D:\\xampp\\apache\\conf\\extra\\httpd-vhosts.conf 您可以使用httpd-vhosts D:\\ xampp \\ apache \\ conf \\ extra \\ httpd-vhosts.conf中的设置

<VirtualHost 79.119.0.11:80>
    DocumentRoot "C:/xampp/htdocs/cacat.massmailerpro.com"
    ServerName cacat.massmailerpro.com
</VirtualHost>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM