Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
473 views
in Technique[技术] by (71.8m points)

mod rewrite - Request exceeded the limit of 10 internal redirects due to probable configuration error.?

i have a simple rewrite

RewriteRule ^.*$ addnew/$0

however i get the

Request exceeded the limit of 10 internal redirects due to probable configuration error.

I am trying to rewrite

www.mysite.com/anycharacter

into

www.mysite.com/addnew/anycharacter

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try the folllowing solution, it works for me.I hope this will work for you too.

  1. BEFORE DOING ANYTHING - BACKUP YOUR DB!

  2. Now, go into wordpress > settings > permalinks

  3. Set it to one of the pretty permalink settings like //year/month/'

  4. Open a text editor on your PC/Mac and open the .htaccess file you downloaded from your webserver

  5. Find this piece of code

    # BEGIN Wordpress
    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    
  6. Replace it with this piece of code, courtesy of Scott Yang:

    <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.+)$ /index.php/$1 [L,QSA]
    </IfModule>
    
  7. Upload this code into the main domain root directory on your server and you're done.

Everything should work


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...