It seems that many people are still having .htaccess issues, even as often as it is discussed on these forums. Looking at all the different posts, it seems that while one answer may resolve one person’s issue, it may not address another person’s issue.
Perhaps it’s time to revisit the super .htaccess file once again that Xeoncross once submitted in these forums, but this time configure that .htaccess file to handle everyone’s issue. It should be WAY over commented to make sure it is self-explanatory to even the most novice .htaccess users.
Most of us know, what works with most hosts does not work with GoDaddy accounts, and what works with GoDaddy may not work with BlueHost, and BlueHost may not work with DreamHost, etc. So, an .htaccess where you choose the lines you need is called for, along with explanations on how to choose and why. I encourage people to respond and help me fine tune the “comments” and the “code lines” until this is the perfect do-all and be-all for all hosting environments. Once completed and vetted thoroughly, I’ll write up a tutorial that we can all link to when we need to guide newcomers, and it may even be handy for the seasoned people to refer back to once in a while.
Ok, here is the .htaccess file I have so far. Please feel free to comment/criticize/suggest additions/suggest removals. If you have a comment or suggestion, please be clear as to why you feel something should be changed, added, removed, along with a simple explanation that those who are novices can understand.
I’ll have to break it up into multiple posts, as it is too long for one post.
#-------------------------------------------------------------------------------
# CodeIgniter .htaccess file for the main index.php directory
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# If you must have your CI "system" directory at <a href="http://www.domain.tld/system/">http://www.domain.tld/system/</a>,
# Then I advise you to place a .htaccess file in that directory
# with "deny from all" in it.
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Be sure to replace "domain.tld" with your actual domain and tld anywhere this
# appears in this file.
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Restore "allow from all" / I use a "deny from all" in some directory
# structures, especially where I am hosting multiple sub-domains that point to
# subdirectories of the main domain, this restores it.
#-------------------------------------------------------------------------------
#allow from all
#-------------------------------------------------------------------------------
# Turn off directory listings for increased security
#-------------------------------------------------------------------------------
Options -Indexes
#-------------------------------------------------------------------------------
# Turn on following symbolic links.
#-------------------------------------------------------------------------------
Options +FollowSymLinks
#-------------------------------------------------------------------------------
# Some web servers require this for index.php to be removed properly. You may
# try your .htaccess with or without the following line.
# Most work fine with it.
#-------------------------------------------------------------------------------
Options -MultiViews
#-------------------------------------------------------------------------------
# Make index.php the directory index page
#-------------------------------------------------------------------------------
DirectoryIndex index.php
to be continued…