四虎精品视频-四虎精品成人免费网站-四虎黄色网-四虎国产视频-国产免费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做動態二級域名解析,轉載需保留來源!

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

主站蜘蛛池模板: cctv16节目表今天目表| 曹查理电影大全免费观看| 刘烨主演的电视剧| 17岁韩国电影完整版观看免费| 一个月经代表七个版本| 陈宝莲徐锦江夜半2普通话| 第一次约会电影| 电视剧热播剧大全| 李采潭全部作品| 澳门风云2演员表| 崔在焕| 7妹| 白鹿跟谁长得像| 749局演员表| 69视频免费看| 2024年计划生育家庭特别扶助| 监禁逃亡2| 吾凰在上动漫在线观看免费| 孙涛个人简历| 微信头像男生| 高档货| 醉翁亭记理解性默写及答案| 性裸体视频| 西野翔电影| 视频污污| 阴道视频| 张天启| 风月电视剧免费观看剧情| 胖女人做爰全过程免费看视频| 什么水果是热性的| 崛井美月| 陈诗雅韩国演员| 七下英语第二单元作文| 崔恩| 丁丁历险记电影| 抖音电脑直播| 浙江卫视网络直播源| 日本大电影| 龙岭迷窟演员表| 数控图纸| 小猫叫声吸引猫mp3|