CyberPanel sets 301 permanent redirect rules

How to set up 301 permanent redirect rules in CyberPanel

Set up in CyberPanelThe rules are very simple. First, you need to log into CyberPanel’s control panel. Then, click the "Websites" tab and find the website for which you want to set redirect rules. In the website settings page, you can find the "Redirect" option, click to enter the settings page. Here you can add a new redirect rule, select 301 permanent redirect, and enter the original and target URLs. After confirming the settings, save the changes to take effect. In this way, you can easily set up 301 permanent redirect rules in CyberPanel to help you manage your website’s redirect traffic.

If you are using the free version of CyberPanel, you can add the 301 redirect code in the rewrite rules of your website configuration.

CyberPanel设置301永久重定向规则-1The code example for setting up a 301 permanent redirect in CyberPanel is as follows:

RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com [NC,OR] RewriteCond %{HTTP_HOST} ^www.example.com [NC] RewriteRule ^(.*)$ http://newexample.com/$1 [L,R =301]
In this example, example.com or www.example.com in the original URL is redirected to newexample.com in the target URL, using a 301 permanent redirect. You can modify the domain name and path in the code according to the actual situation to achieve the redirection rules you want. Remember to test whether the redirect takes effect after saving your changes.
score

Leave a Reply

Your email address will not be published. Required fields are marked *