【phpstudy】PHP 二级子目录(后台目录)设置二级域名

更新时间:2021-07-04    来源:apache    手机版     字体:

【www.bbyears.com--apache】

我们可以利用Apache的.htaccess重写来实现301跳转,具体操作方法是--将后台的根目录文件夹中的.htaccess文件添加内容为:

 

 代码如下

  RewriteEngine on

  RewriteCond %{HTTP_HOST}  ^www\.test\.com$ [NC]

  RewriteRule ^(.*)$  http://xxx.test.com [R=301,L]

 

本文来源:http://www.bbyears.com/jiaocheng/127610.html

热门标签

更多>>

本类排行