Web hosting and domain names bound pseudo-static rule 301 Jump .htaccess 301 redirect
Redirect Old domain name .com to www. New domain name .com.
Code is as follows | Copy the code |
RewriteEngine On |
Redirect Old domain name .com to the new domain name .com
Code is as follows | Copy the code |
RewriteEngine On |
重定向domain.com/file/file.php 到 otherdomain.com/otherfile/other.php
Code is as follows | Copy the code |
RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteBase /news |
#Not slash the requested address is /wwwroot/www.111cn.net/news/
Code is as follows | Copy the code |
RewriteCond %{HTTP_HOST} ^www.111cn.net [NC] RewriteCond %{HTTP_HOST} ^124.173.133.154 [NC] RewriteCond %{HTTP_HOST} ^124.173.133.154 [NC] |
# Modify the following statement / discuz address for your Groups directory,If the program is placed in the root directory,Please / discuz modify /
RewriteBase /
# Rewrite rules do not modify the system
Code is as follows | Copy the code |
RewriteCond %{HTTP_HOST} !^www.111cn.net$ [NC] |
[NC]:no case of abbreviations。Means ignore case,a-z and A-Z is no difference。
[NC,OR]:OR=AND。It meant to be followed under a grammatical sentence。
[R = 301, L]:R=301:redirect Abbreviation。It means using the 301 permanent steering (when the URL in the list above,Automatically redirected to the URL you specify);L:Last Abbreviation,Meaning that the last sentence。