This article mainly introduces the method of setting the second-level domain name in the PHP second-level subdirectory (backend directory). It has a very good reference value. Let’s take a look at it with the editor.
We can use Apache’s .htaccess rewriting to achieve 301 jump. The specific operation method is--change the root of the background The content added to the .htaccess file in the directory folder is:
RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.test\.com$ [NC] RewriteRule ^(.*)$ //m.sbmmt.com/ [R=301,L]