Answers for "forcefully redirect to www using htaccess"

3

.htaccess redirect to another domain

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^OLDDOMAIN.com$ [NC]
RewriteRule ^(.*)$ http://NEWDOMAIN.com [R=301,L]
Posted by: Guest on December-22-2020
0

redirect htaccess non www to www

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Posted by: Guest on April-14-2020
-1

https redirect htaccess

RewriteEngine On 
RewriteCond %{HTTPS} !on 
RewriteCond %{REQUEST_URI} !^/[0-9]+..+.cpaneldcv$ 
RewriteCond %{REQUEST_URI} !^/.well-known/pki-validation/[A-F0-9]{32}.txt(?: Comodo DCV)?$ 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Posted by: Guest on October-30-2020

Code answers related to "forcefully redirect to www using htaccess"

Browse Popular Code Answers by Language