Home  >  Article  >  Backend Development  >  Tips for setting up a second-level domain name in PHP second-level subdirectory (backend directory)

Tips for setting up a second-level domain name in PHP second-level subdirectory (backend directory)

黄舟
黄舟Original
2017-03-04 11:30:243061browse

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:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST}  ^www\.test\.com$ [NC]
    RewriteRule ^(.*)$  http://www.php.cn/ [R=301,L]
  </IfModule>


## The above is the PHP secondary subdirectory (backend directory) setting two Level domain name skills, for more related content, please pay attention to the PHP Chinese website (www.php.cn)!



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn