LimitInternalRecursion Request exceeded the limit of 10 internal redirects

WordPress 1 Comment

Today, I encountered an error when I transferred a word press site. Although it’s not caused by the moving in fact. Anyway, the initial error message displayed in log file as following:

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace., referer:

Read the rest of this entry »

Enable Gzip on Share Hosting in Right Way – Unix Like

WordPress Comments Off on Enable Gzip on Share Hosting in Right Way – Unix Like

The tips for Gzip enabling on sharing hosts installed Unix like OS. I know many resources on can help you already. So this is not an full guide for enable Gzip. Although I have listed a dozen of tips at the end of this post. Read my story to understand what I wanna share with you. That’s an specific medicine for the guys who is dropping in the same situation I met.

Today, I did the optimization for the blog as usual after the blog(buy STO credit) has been set up. The blog is hosted by Godaddy Sharing Host(Specially, Linux economy plan. Why? As it’s cheap prices and decent CS. If you have any suggestion to me, I appreciate!). After the bog got a nice score with YSlow, I noticed that the title rewrite has been all death. I have used the famous WordPress plugin titled All in One SEO by Michael Torbert. Sincerely, I am so lazy so that I didn’t read the sources code ever. I have to read the code to understand how it works. aha..It uses the function ob_start() to get call callback function in the class to rewrite the original title. That’s where the collision comes from. I have used the ob_start(“gz_handler”) to enable Gzip for Read the PHP manual for function ob_end_flush() to know the collision well if you want to know more.
So, the issue I met when I enabled Gzip was clear.

What is the tip to fix?

  • Web Server: Apache 1.3.* with PHP5 on Linux Share Hosting
  • Blog Software: WordPress
  • Plugin Enabled: All in one SEO pack
  • Gzip Enabled Method: call ob_start(“gz_handler”) at the beginning of each page
  • Result: All in one SEO pack title rewrite disables
  • Solution: Use zlib.output_compression to instead of ob_gzhandler()
    1. Remove the ob_start(“ob_gzhandler”) from everywhere in your codes
    2. Modify the php5.ini/php.ini at the web root as following:zlib.output_buffering = On
      ;zlib.output_handler = ob_gzhandler //comment it out, as it cannot be used with the zlib.ouput_compression is on
      zlib.output_compression = On

There are many way to enabled Gzip as following.

Apache 2.0.x – if the mod_felate enabled by your host provider.
Enable Gzip via Mod_deflate
Apache 1.3.x – if the mod_gzip installed and enabled by your host provider
Official Mod_Gzip Manual or Fast Usage Tips
PHP 4.0.4 or higher Ob_start(“ob_gzhandler”)
Fast Effective PHP Gzip Compression
PHP zlib.output_compression
The method in my post!
Other resouces:
Gzip with .htaccess and PHP
Better Explained? Interesting domain

How to add nofollow – Simplest Way

WordPress Comments Off on How to add nofollow – Simplest Way

In order to add the nofollow into the result of wp_get_archives(), you may need a few PHP skills. But it’s simple, means can be understand easily.
The main elements are:

  1. Use the echo feature of the built-in function wp_get_archives
  2. use the PHP function str_replace to add the nofollow tag into the return built-in function.

//step1, built-in function usage; pay attention to the echo=0
//step2 replace the <a with <a rel="nofollow"
$month_archives=str_replace('>a','>a rel="nofollow"',$month_archives);
echo $month_archives;

Remove Genrator Tags

WordPress Comments Off on Remove Genrator Tags

As one of the security tips – we should remove the generator information from the header if we are using wordpress for the blog.
It’s simple to do, just remove the following line from the header.php in your theme.

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

If you are seeking tips for wordpress security. Then the following are bonus if your blog is being run under APACHE.
1: Keep your wp-admin folder safely: just create an .htaccess file.

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName “Access Control”
AuthType Basic
order deny,allow
deny from all
# whitelist home IP address
allow from
allow from
allow from*

2: Don’t expose your plugin:) Just add the blank file into the root of your wordpress plugin file.

Remove Comment Off Tag

WordPress Comments Off on Remove Comment Off Tag

As many wordpress users known, the comment off tag always be showed once you close the comment function. Many users would like to turn off the comment of the wordpress after an given days of the post release. It can be archived via the section DISCUSSION of the wordpress admin. So how can we remove the boring words Comment Off. There are three ways as following.

Modified the function comments_popup_link in the template file of the comment
Find the file named comment-template.php located at wp-icludes. There has the words “Comment Off’ as the value of the variable $none (in the comments_popup_link). – tip credits
The disadvantage of the way: we need to modify the code once we decide to update the wordpress to newer. It’s one of methods to keep safely. Please always update your blog to the newest wordpress version. On the other hands, it will remove the empty HTML tag in your page. It doesn’t help the in-page SEO.
In fact, we change the default value of the last parameters of the function comments_popup_link. So, we can just set its value to instead of the modification of the default value.
Change your theme files – three places
Open index.php and remove this:<span class="add_comment">
Open single.php and remove this:<?php comments_template(); ?>
Open archive.php and remove this:<?php comments_popup_link('No Comments', '1 Comment', '% Comments');?>
The second tip is taken from the blog Compared with the first one, you shouldn't modify the code any more once you have remove those lines. However the wordpress lost the comments tag on all pages for ever:)

Jonrichards_net, one of the members of wordpress forum has mentioned the file comments.php as well as.

@ 2009-2017 - GGIN.Com