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

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

主站蜘蛛池模板: 天天躁天天爽 | 美女国内精品自产拍在线播放 | 乱爱妇乱子伦精品 | 免费a级欧美黑寡妇a观看 | 久久伊人精品一区二区三区 | 110139日韩欧美 | 成人免费黄色网址 | 怡红院亚洲| 欧美zoosex| 国产第页 | 一个色亚洲 | 久久精品免费一区二区三区 | 中文字幕久久久久久久系列 | 中文字幕一区在线播放 | 久久91精品国产91久久小草 | 免费观看四虎精品国产永久 | 色综合合久久天天综合绕视看 | 国产全黄三级国产全黄三级书 | 国产乱了| 日本高清视频wwww色 | 韩国免费一级片 | 中文字幕国产一区 | 在线免费看污视频 | 91精品一区二区三区在线 | 久久久久久久久影院 | 欧美精品亚洲精品日韩经典 | 国产精品一区二区在线播放 | 91小视频版在线观看www | 国产区在线观看 | 久久综合九色综合91 | 欧美成人性色生活片天天看 | 黄色网络在线观看 | 91久久综合 | 欧美videos在线观看 | 国产成人性色视频 | 免费一区二区三区免费视频 | 欧美视频免费一区二区三区 | 亚洲一区二区三区久久精品 | 亚洲欧美成人综合久久久 | 91久久精品青青草原伊人 | 激情在线观看视频免费的 |