Answers for "htaccess 301 redirect"

PHP
2

htaccess 301 whole domain

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !new-example.com$ [NC]
RewriteRule ^(.*)$ http://new-example.com/$1 [L,R=301]
Posted by: Guest on October-05-2021
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
0

redirect 301 htaccess

redirect 301 /url_antigua.html http://www.dominio-nuevo.com/url-nueva/
Posted by: Guest on December-01-2020
-1

redirect htaccess 301

Redirect 301 /pagename.php http://www.domain.com/pagename.html
Posted by: Guest on June-12-2020
1

301 redirect http to https

#For apache .htaccess
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Posted by: Guest on October-02-2020

Browse Popular Code Answers by Language