Author: dooot

  • How to find good domain hacks

    How to find good domain hacks

    Domain hacks, are  domain names that combines domain levels to spell out the full title or name of the domain name. These type of domains spells out a word by using a combination of periods and less popular country-based  extensions. Domain hacks offer the ability to product very short domain names. Examples:   – del.icio.us…

  • Redirect ALL files on your Domain Site Redirect Code

    Redirect ALL files on your Domain Site Redirect Code

      To redirect ALL files on your domain use this in your .htaccess  file if you are on a linux web server:   redirectMatch 301 ^(.*)$ http://www.site.net redirectMatch permanent ^(.*)$ http://www.site.net You can also use one of these in your .htaccess file: redirect 301 /index.php http://www.site.net/index.php redirect permanent /index.php http://www.site.net/index.php redirectpermanent /index.php http://www.site.net/index.php If you…

  • How to redirect non www to www

    How to redirect non www to www

      There are still sites you cannot reach without using www in domain name. That is DNS configuration problem, but what if you find that your site is indexed with 2 domain names – one withwww.yourpage.com and yourpage.com. For search engines, these are two different sites with the same content. Non WWW to WWW redirection…

  • How to disconnect Remote Desktop sessions

    How to disconnect Remote Desktop sessions

      Is there an easy way  to close a Remote Desktop sessions on a windows server? Open command prompt window (Programs / Accessories / Command Prompt ) and get the session number: query session Enter “tsdiscon”  from a command line: (the n should be replaced with the session number) tsdiscon n  

  • How to Delete Existing WordPress Post Revisions

    How to Delete Existing WordPress Post Revisions

      To remove all existing post revisions entries from WordPress database Posts table, simply login to MySQL phpMyAdmin. Select the appropriate WordPress database, and then issue the following command: DELETE FROM wp_posts WHERE post_type = “revision”; it’s recommended to backup the database before performing the deletion SQL statements.  

  • How to Add Default Content in WordPress Post

    How to Add Default Content in WordPress Post

    Open  WordPress theme’s functions.php file ( or child theme functions.php ) and paste the following code within the PHP tags. add_filter( ‘default_content’, ‘my_editor_content’ ); function my_editor_content( $content ) { $content = ‘This is default wp editor content. Shortcode are welcome!’; return $content; }

  • Remove Text from Multiple Files

    Remove Text from Multiple Files

      Shell script to remove some text from multiple files Here is a small script that reads all *.txt  or all *.html, all *.php  files and delete all lines between word1 and word2: #!/bin/bash FILES=”*.php” for f in $FILES do INF=”$f” OUTF=”$f.out.tmp” # replace sed ‘/word1/,/word2>/d’ $INF > $OUTF /bin/cp $OUTF $INF /bin/rm -f $OUTF…

  • How to avoid logging of 404 missing files into error_log

    How to avoid logging of 404 missing files into error_log

      how to stop logging of 404 error? The Simple Method to to disable logging of 404  error into Apache error_log file is: – open .htaccess file – domain for which you want to disable logging missing files ( 404) – put bellow code into .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond…