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

apache+codeigniter 通過.htcaccess做動態二級域名解析

復制代碼 代碼如下:
AuthName "yousite Website Coming Soon..." //如果你想給你的網站加個權限訪問
AuthType Basic
AuthUserFile D:/xxx/.htpasswd #如果你想設置密碼訪問 如何生成.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技術apache+codeigniter 通過.htcaccess做動態二級域名解析,轉載需保留來源!

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

主站蜘蛛池模板: 亚洲系列中文字幕一区二区 | 男女男精品视频网站 | 日韩一级二级三级 | 四虎最新紧急入口4hu | 亚洲一区二区三区香蕉 | 亚洲欧美日本一区 | 在线a网站| 免费一区二区三区四区 | 久久国产乱子伦精品免费一 | 亚洲激情综合网 | 一道精品视频一区二区三区图片 | www.婷| 婷婷激情四月 | 成人综合婷婷国产精品久久免费 | 国产91视频 | 国产在线视频区 | 91在线亚洲综合在线 | 天天拍夜夜拍高清视频 | 一男一女一级毛片 | 好吊妞视频这里有精品 | 天天综合天天做天天综合 | 亚洲精品成人 | 久久婷婷网 | 久久最新网址 | 在线视频一区二区三区四区 | 国产精品一国产精品免费 | 国产精品极品美女免费观看 | 亚洲第一页在线视频 | 美女一级毛片 | 国产成人精品自拍 | 好吊日在线观看 | 美女扒开屁股让男人桶视频网站 | 成人免费福利网站在线看 | 日韩经典欧美精品一区 | 狠狠干.com| 成人福利视频网站 | 久久有码中文字幕 | 六月激情丁香 | 欧美成年黄网站色高清视频 | 久草色视频 | japanese无码中文字幕 |