WordPress .htaccess Code For Redirect Www To Non Www Url | Code For Developers

WordPress .htaccess code for redirect www to non www url

Remove www from url or redirect

.htaccess
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
	RewriteBase /
	RewriteRule ^index\.php$ - [L]
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule . /index.php [L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

Previous Code

Allow Only Business Email Addresses in the Email Field of Elementor Forms

Accept submissions from Business emails on Element ...

Next Code

Implementing WooCommerce Shop Page Quantity Input and Plus (+) Minus (-) Button with simple Code

Enhance the user experience on your WooCommerce we ...

Leave a Reply

Your email address will not be published. Required fields are marked *

If you find it useful

Buy me a coffee

ACF

Elementor

JavaScript

jQuery

Others

PHP

WooCommerce

WordPress

WP Plugin Dev

WordPress Ajax Search without plugin [ Easy ]

WordPress Ajax Search without plugin. Fully custom ...

HTML img tag to HTML SVG tag [WordPress]

Image to SVG for WordPress. Generate svg code from ...

Change WordPress URL in Database with phpMyAdmin and SQL query

Replace WordPress old URL to new URL with SQL Quer ...

Most View or Popular Post on WordPress

WordPress Post query by user views without plugin ...

WordPress Related Post

Show related post on blog single page or any custo ...

top