If you are new to my blog, please let me first welcome you. If you've been here before and enjoy reading "Dr. Mike's Steak Dinner," please consider subscribing to our rss feed as well as linking to us in your blogroll. Thanks. :)

You can also see when I've updated by following me on Twitter. Please add the Dr_Mike account to your list.

axe.jpgIn additional to having a love hate relationship with my Youtube Video Downloader, I also have a love hate relationship with the statistics that I see on this site.  While I don't use the index.html bit in the urls within Movable Type, some folks use it when they link to me.  This splits up page views like crazy.  Makes writing up a Most Read Posts post a pain since I have to sit there with a calculator and work out the numbers. (Hmm, I haven't done one of those in quite a while.)

So anyway, I needed to work out a method of removing the 'index.html' bit from the url.  I came up with the following and added it to my htaccess file:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{THE_REQUEST} \/index.html\ HTTP [NC]
RewriteRule (.*)index.html$ /$1 [R=301,L]


Now the first two lines may already be in your site's .htaccess file.  If you're using WordPress, the second line definitely is as it's required to get pretty permilinks to work.  The third line checks to see if the 'index.html' bit is found within the url and the fourth lines removes it but leaves everything else there.

If you're using WordPress, since you don't use 'index.html' files but 'index.php' you need to use the following instead:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{THE_REQUEST} \/index.php\ HTTP [NC]
RewriteRule (.*)index.php$ /$1 [R=301,L]


Does it work for you?  Here's a pair of links to a previous post about Mac Wallpapers.  The first link has the index.html bit and while the second does not.  Give it a try.

Mac Desktop Wallpaper
Mac Desktop Wallpaper

Related Blog Entries

Find below a list of related entires tagged with the same topics as this post:

ShareThis

Please consider using the ShareThis option if you've enjoyed what I've written. If you click on the link below, a popup will appear giving you options to pass along the content to others. Options include notifing a networking or bookmarking site, sending an email with a link to this article, or even posting about this article on your own website or blog.

1 TrackBacks

Listed below are links to blogs that reference this entry: Remove index.html and index.php from your URLs.

TrackBack URL for this entry: http://drmikessteakdinner.com/cgi-bin/mt/mt-tb.cgi/1304

» Remove the www from URLs from Dr. Mike's Steak Dinner

Awhile back, I did a quick tutorial on how to remove the index.html and index.php files from your urls.  I did it because having both in my stats was driving me nuts and causing dupe urls within Google as well. ... Read More

Leave a comment

Please feel free to leave a comment. Please note that we do have a comment policy and we do ask that you respect it.

Subscribe to Dr. Mike's Steak Dinner

subscribe to my rss feed

Subscribe to Dr. Mike via RSS

Or, subscribe via email:

Enter your email address:

Delivered by FeedBurner

Also subscribe to the Comment Feed

Dr. Mike Sponsors

About this Entry

This page contains a single entry by Dr. Mike published on May 15, 2009 5:31 PM.

Familiar Ground and their Sneeze Page was the previous entry in this blog.

Play a Game of Tetris with uTorrent's Easter Egg is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

June 2010

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30