Likoma's Latest
Comments
- Bradley Charbonneau on Northgate Chiropractic
- Bradley Charbonneau on $5,000 to spend on SEO? Go with WordPress or Drupal
- kayseri evden eve nakliyat on $5,000 to spend on SEO? Go with WordPress or Drupal
- Chiropractic Billing on Northgate Chiropractic
- Matt on $5,000 to spend on SEO? Go with WordPress or Drupal
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!