Tools

Some Basic Help with .htaccess File

Throughout past week I came across several people having trouble with .htaccess files. Really, that tech stuff is sometimes frustrating. We have also discussed the 301 redirect and .htaccess file on DailySEOtip last week and found that many people might be using it incorrectly even though it appeared to work (please refer to the comments).

I am not that tech savvy myself – actually I am self-taught, so most probably there are better ways to do things than what and how I am doing. So I am not going to share my own tips here but rather share my list of helpful resources I refer to when I need some basic edits to my .htaccess file really quickly.

.htaccess Generator

.htaccess Editor – I had been seeing many generators but last week stumbled across this one through Lifehacker post and really liked it. It is very well organized and available in a number of languages.

The step-by-step approach is what I liked most about it. You can click through the tasks and add details and the file will be generated below. Here is an example of setting up 301 redirect:

htaccess generator Some Basic Help with .htaccess File

.htaccess Beginners’ Guides

 Some Basic Help with .htaccess File
Ann Smarty is the blogger and community manager at Internet Marketing Ninjas. Ann's expertise in blogging and tools serve as a base for her writing, tutorials and her guest blogging project, MyBlogGuest.com.
 Some Basic Help with .htaccess File

Comments are closed.

17 thoughts on “Some Basic Help with .htaccess File

  1. I would not recommend that generator, in certain situations it creates errors, especially if it is used on wordpress sites.

    Make sure you test quickly and delete if you have problems.

    Also the first ‘basic help’ with an .htaccess file should really be where you place it on your website and with what privileges…

  2. @seobag, thanks for the link, I’ll check it out.

    @everyone, keep the comments coming! the topic seems to cause a lot of misunderstandings

  3. I’d love to see a guide for us corporate in-house people on how to 301 redirect using Microsoft IIS servers and not having a .htaccess file to use.

    Sure there is the MMC console to create permanent redirects but I had to beg and plead to get temp. access to the console for a huge website migration we did. There’s ISAPI filters out there but are people using them and do they work?

    What do other big websites do for redirects on IIS?

  4. If it’s easy then I can’t find anyone talking about it.

    If there’s something along the lines of an .htaccess file then I don’t know about it.

    and besides the server admins I talk to often don’t know WTF a 301 redirect is.

    can ya feel my frustration? :)

  5. “How do you handle 301 redirects on Microsoft IIS Servers? Please Reply Here : http://bit.ly/e65dm

    We’ve been using ISAPI_Rewrite almost since its inception. We’ve worked with Yaroslav at Helicon Tech to fine tune a few things in the process. If your Windows host does not provide rewriting capabilities in 2009, I might suggest finding a new host who does or point your host to this article.

    There are two flavors of ISAPI_Rewrite; the 2.0 httpd.ini method and the 3.0 .htaccess method. Yes, we now have .htaccess on Windows thank to Helicon Tech. We’re doing everything that the folks on Apache have been doing for years. I personally have been working with rewrites on Windows since the turn of the Century. :)

    Don’t let your archaic Windows Host hold you back from a very important part of your technical foundation.

  6. I always just used a load of if statments to include files..

    Stuff like :
    if Request.ServerVariables(“HTTPS”)=”on” OR Request.ServerVariables(“HTTP_HOST”) “www.domain.com” then

    Response.Status=”301 Moved Permanently”
    Response.AddHeader “Location”, “http://www.domain.com/”&LCase(page)
    end if

    You can have a little more fun in asp with 301 via ip and refferal along with case https etc… :)

  7. Generators are great on a fly, but its important to also know how to hand code. When your client already has a custom file built and they ask you to add something here, or change something here, you need to have the skills to make the hand edits. Heres a great little tutorial on hand editing htaccess files like a pro.

    http://corz.org/serv/tricks/htaccess2.php

  8. Hello all! I’m a reader of this blog quite some time and you’ll find some translations (with credits, of course) from this blog on my blog, if you don’t mind. If there is a problem please tell and I will remove it.

    I’m a Brazilian, so please, excuse my bad English.

    Regarding the Ken Savage request.
    Yes, the ISAP filter works. An our client has implemented as you can see at http://www.pernambucanas.com.br, they use a .Net platform for their e-commerce running on IIS server, we suggest the ISAPI Rewrite from Hellicon and it works pretty well.

    They do not use all power from .httaccess files, but we managed to clean their URLs and get some keywords on it and even develop a search system! The client is very satisfied with the tool and the server is holding well the charge. (And I’m not a Hellicon seller :D)

    And Ann I love your posts… :D

  9. How to handle 301 redirection on Tomcat Server??

    I have surfed the web like anything to find the answer for this but unfortunately we couldn’t.

    Let me know how to resolve URL Conanicalization issue when iam using TOMCAT Server

  10. The link to te beginner’s guide is broken. Please can you fix it as I’m definitely interested in a beginner’s guide!!
    Great Post!!