I bought a space in the host house some time ago. It seems pretty good, but the virtual host is windows. After asking about the space, I said it does not support 301 redirection. The customer service said it could be implemented using a program, finally, the experiment was successful after I found it on the Internet. In fact, the method is very simple. Create a directory, bind the domain name to this directory, and then create a new index in this directory. PHP file, put the 301 redirection ASP or PHP code in the file, so that the domain name bound to this directory is directed to the new domain name defined in your code. I would like to share with you the following. I hope to help some friends who haven't found a solution just like me.
Result: Enter wwbar.com To Go To The http://www.wwbar.com/page.
Note: Sub-directory binding is supported.
1. Bind wwbar.com to your VM in domain name management.
2. Create a folder named 301 under the root directory of the website (you can name the folder by yourself)
3. Open VM management, bind sub-directories, bind Domain Name: wwbar.com bind Directory: 301 (note that 301 is the name of the folder in step 1)
4. Open notepad, create the following text file, save the file as index. php, and upload it to the 301 folder under the root directory.
Reference
<? Php
{
Header ("HTTP/1.1 301 Moved Permanently ");
Header ("Location: http://www.wwbar.com ");
Exit ();
}
?>
Replace the URL in the above document with your url
If your xxx.com has been successfully parsed, enter it.