CyberPanel sets 301 permanent redirect rules

How to set up 301 permanent redirect rules in CyberPanel

Setting in CyberPanelThe rules are very simple. First, you need to log in to the control panel of CyberPanel. Then, click on the "Websites" tab and find the website you want to set up redirection rules. In the website settings page, you can find the "Redirect" option and click it to enter the settings page. Here, you can add a new redirect rule, select 301 permanent redirect, and enter the original URL and target URL. 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 the redirection traffic of your website.

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 sets 301 permanent redirect rule-1The following is a code example for setting a 301 permanent redirect in CyberPanel:

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, and a 301 permanent redirect is used. You can modify the domain name and path in the code according to the actual situation to implement the redirection rules you want. Remember to test whether the redirection is effective after saving the changes.
1/5 - (2 votes)

Leave a Reply

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