四虎精品视频-四虎精品成人免费网站-四虎黄色网-四虎国产视频-国产免费91-国产蜜臀97一区二区三区

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做動態二級域名解析,轉載需保留來源!

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

主站蜘蛛池模板: 溜冰圆舞曲音乐教案| 北京卫视节目单全天| 罗素克劳主演电影| 陈一龙是哪部电视剧| 怒放的生命简谱| 周柯宇个人资料| 性欧美欧美| 胸肌图片| 漂流者| 麦子叔| 凌晨晚餐| 周传雄黄昏歌词| 视频污污| 尼格| 加藤なお| 回响在耳边的____声450字| 梁山伯与祝英台电影| 火与剑| 搜狐手机网首页新闻| 天津电视台体育频道节目单| 只园| 日本无毛| 妖猫传票房| 秀场视频高清完整版| 老男孩之猛龙过江 电影| 丘淑贞| 爱情电影网aqdy| 黄雀电视剧高清完整版| 杨笠 个人资料| 健步如飞的蜗牛三年级作文| 电影《kiskisan》在线观看| 美女亲热视频| 蒙古小男孩唱哭全场| 家庭伦理视频| 生死瞬间演员表| 安息2| 二手大棚钢管急卖2000元| 香港之夜电影完整版在线播放| 七寸照片| 拥抱星星的月亮演员表| 情人意大利|