一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

apache+codeigniter 通過.htcaccess做動態(tài)二級域名解析

復(fù)制代碼 代碼如下:
AuthName "yousite Website Coming Soon..." //如果你想給你的網(wǎng)站加個權(quán)限訪問
AuthType Basic
AuthUserFile D:/xxx/.htpasswd #如果你想設(shè)置密碼訪問 如何生成.htpasswd可以訪問 http://www.htaccesstools.com/htpasswd-generator/
#AuthGroupFile /dev/null
require valid-user

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]


<IfModule mod_proxy.c>
# Redirect to boutique (with any trailing path)
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+).yousite.com(.*)$ [NC]
RewriteRule ^(.*)$ http://www.yousite.com/boutique/$1$2 [P,L]
</IfModule>

<IfModule !mod_proxy.c>
# Redirect to boutique (with any trailing path)
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+).yousite.com(.*)$ [NC]
RewriteRule ^(.*)$ http://www.yousite.com/boutique/%1/$1 [R=301,L]
</IfModule>

## Otherwise, force www;
RewriteCond %{HTTP_HOST} ^yousite.com$ [NC]
RewriteRule ^(.*)$ http://www.yousite.com/$1 [R=301,L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php
</IfModule>

出處:cnblogs 微博:@草根小胡

php技術(shù)apache+codeigniter 通過.htcaccess做動態(tài)二級域名解析,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 久久精品国产国语对白 | 美国黑人毛片 | 国产精品伦理久久久久 | 91免费版视频 | 美女网站黄| 国产极品美女在线观看 | 露脸真实国产精品自在 | 天天色天天操综合网 | 亚洲国产夜色在线观看 | 婷婷97狠狠的狠狠的爱 | 伊人蕉久| 扣扣传媒国产aⅴ | 91精品国产一区 | 成人福利免费在线观看 | 色呦呦网站在线观看 | 国内精品久久久久久不卡影院 | 美女视频黄网站 | 日韩欧美国产三级 | 久久久久久久久影院 | 国产在线91 | 中文字幕av一区二区三区 | 国产精品免费一区二区区 | 国产欧美精品区一区二区三区 | 色成年激情久久综合 | 2021国产视频| 青青草国产免费国产 | www.欧美.com| 亚洲精品手机在线观看 | 美国一级做a爰片性色毛片 美国一区二区三区 | 国产一级毛片午夜福 | 亚洲日本欧美产综合在线 | 激情综合五月 | 色哟哟哟在线观看www | 日本久久综合网 | 国产福利观看 | 国产成人综合日韩精品婷婷九月 | 国产愉拍精品手机 | 久久精品国产精品亚洲婷婷 | 国产最强大片免费视频 | 色综合欧美 | 国产亚洲精品美女久久久久久2021 |