Answers for "htaccess redirect 301"

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

htaccess redirect to https

RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^yourdomain\.com [OR]
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com
RewriteRule .* https://yourdomain.com%{REQUEST_URI} [R=301,L]
Posted by: Guest on September-26-2020
0

redirect 301 htaccess

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

301 redirect

#In .htaccess
  
Redirect 301 /old-page https://www.example.com/new-page
Posted by: Guest on July-13-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