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

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

主站蜘蛛池模板: 国产香蕉久久精品综合网 | 国产精品好好热在线观看 | 国产一区二区高清视频 | 国产自产c区 | 伊人久久大香线 | 亚洲欧美一区二区三区不卡 | 精品国产精品国产 | 欧美色欧美亚洲高清在线观看 | 一区一区三区产品乱码 | 日本乱中文字幕系列在线观看 | 精品日本一区二区三区在线观看 | 91在线视频免费91 | 国产精品91视频 | 久月婷婷| 国产精品玖玖 | 国产一区二区三区在线看 | 伊人任线任你躁 | 久久精品国产大片免费观看 | 欧美日韩国产超高清免费看片 | 在线精品国内视频秒播 | 97香蕉超级碰碰碰久久兔费 | 亚洲成a人片在线v观看 | 亚洲成人免费网址 | 桃花综合久久久久久久久久网 | 久久免费公开视频 | 视频在线精品 | 国产成人精品免费视频大全可播放的 | 99热这里有免费国内精品 | 国产欧美日韩不卡一区二区三区 | 伊人天伊人天天网综合视频 | 91免费视频国产 | 国产免费美女 | 久久亚洲精品玖玖玖玖 | 一级做a爰片性色毛片武则天五则 | 久久精品视频一区二区三区 | 国产乱色 | 日韩精品福利视频一区二区三区 | 婷婷丁香在线观看 | 视色4se成人午夜精品 | 性开放视频 | 热re99久久国产精品 |