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

Most View or Popular Post on WordPress

WordPress Post query by user views without plugin ...

WordPress Next and Previous Post

WordPress Next and Previous Post navigation for cu ...

Conditional statement to show pagination

Conditional statement to show pagination on WordPr ...

wp-config development code

WordPress post revisions, debug, load-scripts.php ...

WordPress Related Post

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

top