How to Implement 301 Permanent Redirects in Apache

       Since the website uses www.cnop.net as its domain, we want to redirect all cnop.net traffic to www.cnop.net. Following Google’s recommendation, we will use a server-side 301 redirect, the best method to ensure both users and search engines are directed to the correct page. A 301 status code indicates that a webpage has been permanently moved to a new location.
      Below we’ll cover two methods to implement a 301 permanent redirect in Apache, which require access to the server’s .htaccess file.
The code is as follows; simply upload it to the website root directory:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^cnop.net$

RewriteRule ^(.*)$ http://www.cnop.net/$1 [R=301,L]

Attachment https://www.cnop.net/uploadfile/2016/0107/20160107035942986.zip

Leave a Comment

Your email address will not be published.