把首页页地址绑定子目录的方法实例

来源:互联网 发布:淘宝花呗分期有利息吗 编辑:程序博客网 时间:2024/05/29 16:23
RewriteEngine on# 把 m.witmax.cn 改为你要绑定的域名.RewriteCond %{HTTP_HOST} ^(http://)?localhost$ # 把 subdir 改为要绑定的目录.RewriteCond %{REQUEST_URI} !^/orderfood/ # 不要改以下两行.RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-d # 把 subdir 改为要绑定的目录.RewriteRule ^(.*)$ /orderfood/$1 # 把 m.witmax.cn 改为你要绑定的域名# 把 subdir 改为要绑定的目录.# subdir/ 后面是首页文件index.php, index.html…… RewriteCond %{HTTP_HOST} ^(http://)?localhost$RewriteRule ^(/)?$ orderfood/index.php [L]




http://witmax.cn/apache-domain-subdir.html

原创粉丝点击