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

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

主站蜘蛛池模板: 高清不卡免费一区二区三区 | 婷婷亚洲激情 | 人人免费人人专区 | 婷婷激情片 | 日本精品1在线区 | 国产91精选在线观看麻豆 | 日本韩国一级 | 99精品久久久久久久免费看蜜月 | 国产aⅴ精品一区二区三区久久 | 亚洲国产精品线播放 | 首页 动漫 亚洲 欧美 日韩 | 国产精品久久久久毛片真精品 | 香蕉久久夜色精品国产2020 | 成年人香蕉视频 | 午夜国产在线观看 | 国产福利不卡 | 久久婷婷激情综合色综合也去 | 丁香六月婷婷激情 | 成人国产第一区在线观看 | 亚洲福利视频一区二区 | 女人的天堂网 | 欧美不在线 | 国产极品白嫩美女在线观看看 | 国产精品第一页在线观看 | 国产九九在线 | 99精彩免费观看 | 精品视频免费看 | 久久五月激情婷婷日韩 | 天天爱天天做色综合 | 欧美色tv| 狠狠入ady亚洲精品 狠狠色成人综合首页 | 91精品国产麻豆福利在线 | 狠狠色噜噜狠狠狠米奇9999 | a一级一色一情 | 玖玖色在线 | 亚洲黄色高清 | 日本一区二区三区在线 观看网站 | 亚洲综合图片网 | 国产精品亚洲第一区焦香 | 色一情一区二区三区四区 | 狠狠入ady亚洲精品 狠狠色成人综合首页 |