Search
 
SCRIPT & CODE EXAMPLE
 

PHP

redirect www to non-www wordpress multisite

RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$
http://www.%{HTTP_HOST}/$1 [R=301,L]
Comment

redirect www to non-www wordpress multisite

######################################################################
## Redirect non-www to www
##
## If you enable this, disable the "Redirect www to non-www" below!
######################################################################
if ($host = 'example.com' ) {
    rewrite ^/(.*)$ http://www.example.com/$1 permanent;
}
######################################################################


Redirect www to non-www


If you enable this, disable the “Redirect non-www to www” above!

######################################################################

if ($host = ‘www.example.com’ ) {

rewrite ^/(.*)$ http://example.com/$1 permanent;

}


######################################################################


Redirect example.org to example.com


Your server_name must include both the old and new domain names!

######################################################################

if ($host ~ “(www.)?example.org$” ) {

rewrite ^/(.*)$ http://www.example.com/$1 permanent;
Comment

PREVIOUS NEXT
Code Example
Php :: custom end-point request php-salesforce-rest-api 
Php :: RouteSubscriber disallow user routes 
Php :: email in ctf 
Php :: laravel count soft delete data 
Php :: get git branch with php 
Php :: extract email from text 
Php :: Everything inside a pair 
Php :: Crear un componente livewire 
Php :: obtener tipo 
Php :: rename image file using post id in wordpress programmatically 
Php :: static functions php 
Php :: menu order for posts 
Php :: Unable to open sqlite DB file from js axios.get request 
Php :: Nginx + Laravel - Moving blog from subdomain to /blog 
Php :: laravel how to generate short link in laravel framework and relation with 3 model 
Php :: paygate logout session on callback laravel 
Php :: add attribute to model laravel 
Php :: base64 to arraybuffer php 
Php :: the_field 
Php :: without login cant purchase woocommerce 
Php :: mac php.ini catalina 
Php :: php notice: trying to access array offset on value of type bool in /usr/share/php/pear/rest.php on line 187 
Php :: subdomain ajax request fail in php 
Php :: php numeros enteros 
Php :: wordpress ftp functions.php 
Php :: woo can not change products perpage in shop page 
Php :: mysql_query not working in php 7 
Php :: DateTimeZone not found laravel 
Php :: php square root 
Php :: symfony translation variable in twig 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =