htaccess

Redirect

Access Control

Redirect domain to SSL (HTTPS)

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

Or

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Redirect a Page to another

RedirectMatch 301 ^/old-page\.php$ /new-page.php

You can also use

Redirect 301 /old-page.php https://domain.com/new-page.php
Need help with Linux Server or WordPress? We can help!

Leave a Reply

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