Redirect a WordPress site from non-WWW to WWW

How to redirect your WordPress site's domain from non-www to www or vice versa. If you go to https://www.wordpress.org, you'll see the URL changes a bit once you click enter. It goes to the non-www version. In order words, it goes to https://wordpress.org. It's a subtle change and it's usually not noticed by users. So … Continue reading Redirect a WordPress site from non-WWW to WWW

Disable cache in server using htaccess

Disable cache in server using htaccess after refreshing showing same page in Codeigniter, after logout in showing active sessions again in codeigniter, stores in caching and blocks to fetch new page from server, Disable cache in server, block cache by htaccess, # DISABLE CACHING <IfModule mod_headers.c> Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Pragma … Continue reading Disable cache in server using htaccess

PageSpeed: Leverage browser caching

PageSpeed: Leverage browser caching Find your .htaccess file in the root of your domain. This file is a hidden file but should show up in FTP clients like FileZilla or CORE. You can edit the .htaccess file with notepad or any form of basic text editor. In this file we will set our caching parameters … Continue reading PageSpeed: Leverage browser caching

Redirect all url with a query string in php

<IfModule mod_rewrite.c>     RewriteEngine On     RewriteCond %{QUERY_STRING} !(^|&)testing=true(&|$) [NC]     RewriteRule ^ %{REQUEST_URI}?testing=true [L,QSA,R]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)     RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>

Append a query string to any url requested from my website in Codeigniter

Append a query string to any url requested from my website in Codeigniter. Example. Url will look LikeExample. Url will look Like example.com example.com/product example.com/search?q=string to example.com?testing=true example.com/product?testing=true example.com/search?q=string&testing=true <IfModule mod_rewrite.c>     RewriteEngine On     RewriteCond %{QUERY_STRING} !(^|&)testing=true(&|$) [NC]     RewriteRule ^ %{REQUEST_URI}?testing=true [L,QSA,R]     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond … Continue reading Append a query string to any url requested from my website in Codeigniter