Apache
Bash
CSS/HTML
Git
JavaScript
jQuery
Laravel
Linux
MySQL
Nginx
PHP
Regex
Tools
Uncategorized
Vue.js
WordPress

Redirect www to non-www URLs

If you want redirect users from www to a plain, non-www domain, insert this configuration in your .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] [...]

Redirect non-www to www URLs

If you want redirect users from a plain, non-www domain to a www domain, insert this configuration in your .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\. [NC] [...]