For example,/bbs/301 redirects to a new second-level domain name
I directly added a bbs. conf file for lnmp to/usr/local/nginx/conf.
Add an include bbs2.conf entry in the conf configuration of 111cn.net;
Restart completed.
The content of bbs. conf is:
The code is as follows: |
Copy code |
Location ~ * ^/Bbs /{ Rewrite ^/bbs/(. *) $ http: // your second-level domain name/$1 permanent; } |
It should be fine if you do not add this conf file, but you do not know where to insert it. Simply add a conf file to make it simple.
Htaccess file code method
This method is only suitable for apache servers and supports rewrite Pseudo-static. Add the following rule directly to the. htaccess file:
The code is as follows:
The code is as follows: |
Copy code |
RewriteEngine On RewriteBase/ Redirect permanent/your Directory address http://www.111cn.net/ |
Rule note: when accessing the original program sub-directory (/your Directory address), the system automatically redirects to your second-level domain name http://bbs.mrlon.net/and another new domain name (please change the domain name URL to your own ).