Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php 301 redirect

<?php // Permanent 301 Redirect via PHP
	header("HTTP/1.1 301 Moved Permanently");
	header("Location: http://domain.tld/new/location/");
	exit();
?>
Comment

301 redirect

#In .htaccess
  
Redirect 301 /old-page https://www.example.com/new-page
Comment

301 redirect

301, "Moved Permanently"—recommended for SEO
302, "Found" or "Moved Temporarily"
Meta Refresh 
Comment

301 redirect

#http to https and www to non-www
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www. [NC]
RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
Comment

PREVIOUS NEXT
Code Example
Php :: wherebetween in laravel 
Php :: php array to js 
Php :: ci3 upload file 
Php :: Internal error: xmlSchemaValidateChildElem, calling xmlRegExecPushString2(). 
Php :: add dd function composer 
Php :: remove autoupdate wordpress 
Php :: Fetch Data From Database With MySQLI 
Php :: wordpress post excerpt from post id 
Php :: get host from url php 
Php :: check if value is not null in db laravel 
Php :: disable edit-link storefront 
Php :: combine array except common ones php 
Php :: header cross origin using php only for our domains and subdomain 
Php :: laravel form method delete 
Php :: trim elements of array php 
Php :: how to set session timeout in codeigniter 
Php :: php directory listing 
Php :: php array move first element to last 
Php :: cart icon in woocommerce 
Php :: set session data in laravel 
Php :: php replace 
Php :: persian error laravel 
Php :: remove spaces from string php 
Php :: send email when form is submitted php 
Php :: mobile number validation in laravel 8 
Php :: Git delete single branch 
Php :: php unique string 
Php :: forever loop php 
Php :: php is day light saving time 
Php :: asset not working in laravel 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =