課程
/后端開發
/PHP
/重定向和偽靜態在網站中的應用
老師,二級域名怎么設置?謝謝
2017-05-21
源自:重定向和偽靜態在網站中的應用 4-11
正在回答
如果是apache服務器的話,在httpd-vhosts.conf文件中加上
<VirtualHost *:80>
? ?ServerAdmin [email protected]
? ?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即可
舉報
重定向和偽靜態,網站安全SEO優化必學,演示各種重定向設置后效果
1 回答瀏覽器會緩存.htaccess設置么?
1 回答請問老師慕課網的URL重寫是怎么實現的?
2 回答如何設置一個完全的防盜鏈(包括禁止用戶直接訪問)?
2 回答用phpstudy在主配置文件里什么位置寫重定向規則
2 回答.htaccess配置問題
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2017-06-12
如果是apache服務器的話,在httpd-vhosts.conf文件中加上
<VirtualHost *:80>
? ?ServerAdmin [email protected]
? ?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即可