RewriteEngine on
# 把 m.witmax.cn 改为你要绑定的域名.
RewriteCond %{HTTP_HOST} ^(http://)?localhost$
# 把 subdir 改为要绑定的目录.
RewriteCond %{REQUEST_URI} !^/orderfood/
# 不要改以下两行.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{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]