課程
/后端開發(fā)
/PHP
/重定向和偽靜態(tài)在網(wǎng)站中的應(yīng)用
老師,二級(jí)域名怎么設(shè)置?謝謝
2017-05-21
源自:重定向和偽靜態(tài)在網(wǎng)站中的應(yīng)用 4-11
正在回答
如果是apache服務(wù)器的話,在httpd-vhosts.conf文件中加上
<VirtualHost *:80>
? ?ServerAdmin webmaster@iwebshop.com
? ?DocumentRoot "F:/www/test"
? ?ServerName xxx.test.com
? ?ErrorLog "logs/my.iwebshop.com-error.log"
? ?CustomLog "logs/my.iwebshop.com-access.log" common
? ?<Directory "F:\www\test">
? ? ? ?Options Indexes FollowSymLinks
? ? ? ?AllowOverride All
? ? ? ?Require all granted
? ?</Directory>
</VirtualHost>
然后在hosts文件中最下面加上 127.0.0.1 ?xxx.test.com
重啟apache即可
舉報(bào)
重定向和偽靜態(tài),網(wǎng)站安全SEO優(yōu)化必學(xué),演示各種重定向設(shè)置后效果
1 回答瀏覽器會(huì)緩存.htaccess設(shè)置么?
1 回答請(qǐng)問老師慕課網(wǎng)的URL重寫是怎么實(shí)現(xiàn)的?
2 回答如何設(shè)置一個(gè)完全的防盜鏈(包括禁止用戶直接訪問)?
2 回答用phpstudy在主配置文件里什么位置寫重定向規(guī)則
2 回答.htaccess配置問題
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2017-06-12
如果是apache服務(wù)器的話,在httpd-vhosts.conf文件中加上
<VirtualHost *:80>
? ?ServerAdmin webmaster@iwebshop.com
? ?DocumentRoot "F:/www/test"
? ?ServerName xxx.test.com
? ?ErrorLog "logs/my.iwebshop.com-error.log"
? ?CustomLog "logs/my.iwebshop.com-access.log" common
? ?<Directory "F:\www\test">
? ? ? ?Options Indexes FollowSymLinks
? ? ? ?AllowOverride All
? ? ? ?Require all granted
? ?</Directory>
</VirtualHost>
然后在hosts文件中最下面加上 127.0.0.1 ?xxx.test.com
重啟apache即可