一区二区久久-一区二区三区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)系我們修改或刪除,多謝。

主站蜘蛛池模板: 久久婷婷综合中文字幕 | 国产最新精品 | 国产99免费视频 | 色视频哟女在线观看 | 美女很黄很黄免费 | 久久伊人婷婷 | 91系列在线观看免费 | 日本高清加勒比 | h视频免费观看 | 国产三级福利 | 加勒比色综合 | 搞黄网站在线观看 | 久久999精品 | 波多野结衣视频一区二区 | 五月婷婷丁香网 | 在线视频一区二区三区三区不卡 | 在线二区 | 国产在热线精品视频国产一二 | 精品国产午夜肉伦伦影院 | 狠狠色伊人亚洲综合网站l 狠狠色伊人亚洲综合网站色 | 黄色视屏网站 | 亚洲成精品动漫久久精久 | 国产综合精品久久亚洲 | 91麻豆麻豆 | 国产精品日韩欧美一区二区三区 | 国产精品区一区二区免费 | 亚洲午夜在线视频 | 国产91在线视频 | 一区二区在线观看视频 | 色视频免费观看高清完整 | 91国内视频 | 44444色视频在线观看 | 国产一区二区精品久久凹凸 | 深爱激动网婷婷狠狠五月 | 成人免费黄色网址 | 九月婷婷综合 | 视色4se000| 国产亚洲综合精品一区二区三区 | 亚洲国产网 | 国产精品视频在 | 99视频这里有精品 |