Stopping Wordpress From Appending /index.html to everything

Posted by user439796 on Stack Overflow See other posts from Stack Overflow or by user439796
Published on 2011-01-16T23:33:00Z Indexed on 2011/01/17 8:53 UTC
Read the original article Hit count: 154

Filed under:
|

I have a spaghetti code of a theme I inherited from someone and for whatever reason Google Analytics shows that I keep getting hits to a variety of URLs on the site, but the urls are all appended with /index.html. So an example would be like http://www.mysite.com/category/storyname/index.html

And it appears to be doing this to almost everything (despite my permalinks being set to be "tidy").

So...

  1. What in the hell could be possibly causing this?
  2. How do I fix it? When I visit all those pages I get 404 errors so that means my visitors are not getting what they want.

I have the Redirection plugin and have been manually trying to update some of these, but it is ridiculous. I'm sure there's a way to do it with htaccess but I know next to nothing about that. Here's what my htaccess currently has (the default):

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about .htaccess