Never-ending cycle of Rewrites in .htaccess file
-
I was getting 500 internal server errors when I navigated to a page on my site that didn’t exist. This should have been a 404 error. When I emailed my webhost to ask why I was getting 500 errors instead of 404 errors, he told me that I have a never-ending cycle of re-writes in my .htaccess file. Here’s the sample error message that my webhost said was generated…
[Thu Jul 27 23:36:29 2006] [error] [client IP Address Here] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use ‘RewriteOptions MaxRedirects’ to increase the limit if neccessary.
I have never *personally* added a single line of code to my .htaccess file. Instead, WordPress writes to the .htaccess file.
I am using the .htaccess file to
1.) maintain permalinks, and
2.) re-direct XML feeds to Feedburner.My questions are
1.) How did this happen? and
2.) How do I get my .htaccess file back to normal?Here’s what the .htaccess file looks like now…
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect FeedBurner to your own Feed
RewriteBase /
RewriteRule ^feedburner_397665/?$ /feed/ [R,L]
RewriteCond %{HTTP_USER_AGENT} ^FeedBurner.*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# These Rules redirect all feed Traffic to FeedBurner
RewriteBase /
RewriteCond %{QUERY_STRING} ^feed=(feed|rdf|rss|rss2|atom)$
RewriteRule ^(.*)$ https://feeds.feedburner.com/my_blognamehere [R,L]//Can I delete everything after this, and still be okay?
RewriteRule ^(feed|rdf|rss|rss2|atom)/?(feed|rdf|rss|rss2|atom)?/?$ https://feeds.feedburner.com/my_blognamehere [R,L]
RewriteRule ^wp-(feed|rdf|rss|rss2|atom).php https://feeds.feedburner.com/my_blognamehere [R,L]
# These are the standard WordPress Rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
Could someone please tell me what lines of code I need to delete, so I can fix this problem?
- The topic ‘Never-ending cycle of Rewrites in .htaccess file’ is closed to new replies.