Leverage browser caching for .htaccess

How to do Leverage browser caching for .htaccess. Below code will tells browsers what to cache and how long to “remember” it a browser.  Top of your .htaccess file place below code. Leveraging browser caching can significantly improve the speed and performance of your website. Here’s how you can set up browser caching for your website’s .htaccess … Read more

How to Write Robots.txt for Your Website?

To exclude all robots from the entire server User-agent: * Disallow: / To allow all robots complete access User-agent: * Disallow: (or just create an empty “/robots.txt” file, or don’t use one at all) To exclude all robots from part of the server User-agent: * Disallow: /cgi-bin/ Disallow: /tmp/ Disallow: /junk/ To exclude a single … Read more

Categories Uncategorized

After automatic update of WordPress my site showing blank white page

If you find your WordPress site showing blank white page. Then try to login with example.com/wp-admin. If you can login then again try to see your website example.com. if you can see your site then it will be your site cache problem. just remove your site cache manually by ftp or file manager then then check … Read more

Categories Uncategorized

How to display links in a WordPress excerpt?

Allowing link in a excerpt very common issue for WordPress users. You can display excerpt link by adding this script to your theme “functions.php” file. remove_filter( ‘the_excerpt’, ‘wp_trim_excerpt’ ); function new_trim_excerpt($text) { global $post; if ( ” == $text ) { $text = get_the_content(”); $text = apply_filters(‘the_content’, $text); $text = str_replace(‘\]\]\>’, ‘]]>’, $text); $text = preg_replace(‘@<script[^>]*?>.*?</script>@si’, ”, $text); … Read more

Categories Uncategorized

How to remove index.php From Website URL?

Remove index.php from any Website URL to keep away from Google duplicate content penalty. It will increase your website home page visibility in all major search engine. RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]  

Categories Uncategorized

AdSense bad content filtering

You can filter bad content using google Profanity API. Using this API you can find out your page have bad word or not. This function will return a 1, otherwise a 0 is returned. if 0 then show AdSense ads if 1 disable your ads. This way you can save your website. from AdSense penalty.

Categories Uncategorized

Redirect Non WWW to WWW Using .htaccess

Redirect non www to www using your domain name RewriteCond %{HTTP_HOST} ^example.com$ RewriteRule (.*) http://www.example.com/$1 [R=301,L] Or use this for any domain: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] If you have ssl enabled then add this two line for http to https redirect RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Categories Uncategorized

Speed up WordPress CMS Menu Loading

Overview We can customize the WordPress navigation menus with writing few lines of codes. wp_nav_menu is the WordPress menu function to display custom menus created in domain.com/wp-admin>Appearance>Menus panel . It is a must use function but it’s not perfect for all website or projects. Default menu function OK for small websites but if your site is large and have more … Read more

Categories Uncategorized

What is MEMS Accelerometer?

MEMS accelerometer are micro electro mechanical systems that measure the static or dynamic force of acceleration.  Static force refers to the earth’s gravitational pull.  On the surface of the Earth, all objects fall with an acceleration defined as one “g”, which is approximately equal to 9.81 m/s² (32.17 ft/s²).  Quite often, “g” is used as … Read more

Categories Uncategorized

Redirect HTTP traffic to HTTPS using an .htaccess

Create a .htaccess file then write this code you will redirect all HTTP traffic to HTTPS. ##Global Http to Https Redirect RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] If you want a single page to redirect http to https then use this code. ## single page redirect RewriteEngine On RewriteRule ^redirect-http-to-https-page\.html$ https://www.example.com/redirect-http-to-https-page.html [R=301,L]

Categories Uncategorized