Likoma's Latest
Comments
Recently
- Nature Nurture
- Kim Brown Seely
- WordPress Tutorial | Overview of Basic Publishing (2.9.2)
- All switched, no problems, thanks.
- WordPress Tutorial | WordPress E-Commerce Shortcodes
- WordPress Tutorial | Page Template and Recent Posts from Category
- WordPress Auto Install on GoDaddy
- Gaines-Jones Education Foundation
- Dead Love
- Mexico 2010 San Francisco
Recently
WordPress “comments” in .htaccess file
By Bradley Charbonneau | Filed under Help, WordPress
I didn't realize I needed the WordPress "comments" in the .htaccess file. I just learned the hard way as a site went down, I checked the .htaccess file (one of the first places I look for a 500 error) and it looked like this:
CODE:
-
RewriteEngine On
-
RewriteBase /
-
RewriteCond %{REQUEST_FILENAME} !-f
-
RewriteCond %{REQUEST_FILENAME} !-d
-
RewriteRule . /index.php [L]
-
-
<IfModule mod_security.c>
-
SecFilterEngine Off
-
SecFilterScanPOST Off
-
</IfModule>
-
-
# BEGIN WordPress
-
-
RewriteEngine On
-
RewriteBase /
-
RewriteCond %{REQUEST_FILENAME} !-f
-
RewriteCond %{REQUEST_FILENAME} !-d
-
RewriteRule . /index.php [L]
-
-
< IfModule mod_security.c>
-
SecFilterEngine Off
-
SecFilterScanPOST Off
-
</IfModule>
-
-
# END WordPress
Hmm, doubled up. WP had automatically put in the second set of code when someone saved a post. Who knew. I read that if WP sees the comments, it will read what's in there and if it's already there, won't write it again. So what my .htaccess file should look like is just this:
CODE:
-
# BEGIN WordPress
-
-
RewriteEngine On
-
RewriteBase /
-
RewriteCond %{REQUEST_FILENAME} !-f
-
RewriteCond %{REQUEST_FILENAME} !-d
-
RewriteRule . /index.php [L]
-
-
<IfModule mod_security.c>
-
SecFilterEngine Off
-
SecFilterScanPOST Off
-
</IfModule>
-
-
# END WordPress





May 22nd, 2008 at 9:25 am
You totally saved my life with this one! I kept crashing a site when I was updating a post and couldn't figure it out. Thanks!