Sponsored by Microsoft
Microsoft responds to the headlines. view!
microsoft.com/everybodysbusiness - Read our developers' points of view on the headlines making news.
50 Comments
- Arbinshire, on 10/12/2007, -4/+39@marco - Put. The. Crack. Pipe. Down.
- macfanboi, on 10/12/2007, -2/+16Marco - Rosetta Stone is your friend.
This is a good find. - inactive, on 10/12/2007, -0/+9its seriously disorganised. but still, dugg for the great idea :)
- Arbinshire, on 10/12/2007, -0/+9@M4RSH4L - Shouldn't you be wearing your tinfoil hat?
.htaccess can't be read once it's on your webserver. It's an Apache directive. It's also not .htpasswd that it's generating. - Adoozie, on 10/12/2007, -3/+11.htaccess files are only for Apache, yes. But why would you use IIS?
- Arbinshire, on 10/12/2007, -4/+10Seriously sweet.
- M4RSH4LL, on 10/12/2007, -10/+15Wouldn't this be a security issue?
- mailman-zero, on 10/12/2007, -0/+5And how does that help the thousands of digg users with shared hosting accounts? This is for them. If you were running your own server then you probably wouldn't be impressed by this .htaccess generator anyway.
- Adoozie, on 10/12/2007, -0/+5No. There's nothing secret about how .htaccess files work.
- jarbro, on 07/23/2009, -1/+6i have used others in the past... but this one... this is the BMW of htaccess gens... vroooom!
- id000001, on 10/12/2007, -2/+7How is it a security issue? If someone can read a .htaccess file on your server, you have a much bigger problem.
- JoeLeo, on 10/12/2007, -1/+6No, it won't work on IIS, but over 60% of the world's Web servers are Apache:
http://news.netcraft.com/archives/web_server_survey.html - KageKonjou, on 10/12/2007, -0/+4I'm a web developer, and I must say this is very useful for anyone who is not familiar with .htaccess commands. Move digg, for great justice. Good find.
- scsikool, on 10/12/2007, -2/+6Why give M4RSH4L a thumbs down? It's a fair question deserving of a fair answer.
- thehouse, on 10/12/2007, -0/+4remembering the options is my problem - I keep an example file and a sed script to make changes based on the environment. this is pretty convenient though for your first few .htaccess files.
- kenplaysviola, on 10/12/2007, -0/+4To me this is much easier because I am not too familiar with all the options of .htaccess. I was reading through the Apache website regarding .htaccess and it was a little overwhelming! This makes it much easier for a simple .htaccess.
- DuttonLake, on 10/12/2007, -0/+4I have seen other .htaccess generators, they usually only have 10% of the features that this one has.
- inactive, on 10/12/2007, -0/+3Oh, if only EVERY webmaster were as arrogant as you. The Internet would be a joyous realm, indeed.
/sarcasm - redivider, on 10/12/2007, -0/+3Sure if you know what you're doing, you could make your own. For some people though, that's not an option. And if you search any forum dealing with apache administration you'll find thousands of people asking the same questions over and over again.. what is .htacess? how do I use mod_rewrite? etc etc. So obviously there is a demand for something like this.
Also, for those people how don't know what they are doing, they can use it to learn. Making the connection between the form options and the contents of the htaccess file will probably help a lot of people understand how to eventually set one up on their own. - greyfade, on 10/12/2007, -0/+3haha, Norton AntiVirus wouldn't let me visit this page b/c it has '/.ht' in the URI. :D
- macfanboi, on 10/12/2007, -1/+4Just don't enter your real domain when you generate the file, also generate the file from a network other than your own, incase they are logging IP.
If you are worried go here and have a great day!
http://httpd.apache.org/docs/trunk/howto/htaccess.html - kenplaysviola, on 10/12/2007, -0/+3THANK YOU! I was reading through the Apache documents and options about .htaccess. This makes everything much easier! THANK YOU!
- loonysalmon, on 10/12/2007, -3/+5sounds like you're having a great day
- cfinke, on 10/12/2007, -3/+5@Yarnage and id000001: This would be a security issue if this site is storing the resulting .htaccess files on their server and uses the information entered to attempt to hack the server that the file will be stored on (assuming they can figure that out). Of course, there's not really any high-security information in an .htaccess file, but there's still enough information that a Web server won't let you read it.
- dongiaconia, on 10/12/2007, -2/+4I wouldn't go so far as to say *any* website owner/creator. This doesn't work across all web servers, right? I know it works on my Apache server, but I don't think it works with IIS. Or am I wrong?
- Phusion, on 10/12/2007, -0/+2I've been using linux web servers for years now and I never wanted to delve into the .htaccess file.. this is VERY useful if you know what you're doing. Check this one out, digg+
- tymonn, on 10/12/2007, -0/+2thank you man,
awsome work :) - Yarnage, on 10/12/2007, -1/+2How would this be a security issue?
- indranil, on 10/12/2007, -0/+1Such an interesting view into your mind!
- inactive, on 10/12/2007, -0/+1Well, Apache Foundation really recommends you to NOT use .htaccess files, but to set the settings in the main apache configuration files, which will speed things up somewhat.
Of course you can just copy the settings this program generates for you into a statement in the main apache config... - wired4u, on 10/12/2007, -0/+1this is great +digg
- felchdonkey, on 10/12/2007, -8/+9PLEASE mod Marco's comment back up, folks. Eloquence like that must be out in the light for all to see...
- studiorats, on 10/12/2007, -0/+1sweet.
- inactive, on 10/12/2007, -2/+2I run a small gaming website (small = ~70 members), so this is VERY helpful to me. Awesome digg.
- PAqui, on 10/12/2007, -0/+0noob ques - how would this work with programs like easyphp and xammp (running on windows)? They frequently need the .htacess file in the main directory in order for them to work properly. Any tips?
- masskurec, on 03/03/2009, -0/+0nice generator
http://xptweak.net - crossers, on 07/19/2008, -0/+0very interesting and useful for people who looks information how get better own site!
http://www.sitemapwriter.com
http://www.rsschanelwriter.com
http://www.shpe-sac.org
http://www.ocflex.com/
http://www.trgovinca.org
http://www.chasr.org/ - JoeAverage, on 10/12/2007, -1/+1Awesome, this is a great tool.
- sravkum, on 10/12/2007, -1/+0Very usefull feature - was just looking for this. Good one nice job, will use this for my site.
http://www.mavenarts.com - dharm, on 10/12/2007, -5/+4agreed...
it takes me longer to go through the forms than type up a .htaccess file... - tsammons, on 10/12/2007, -1/+0There's a few problems though:
- ErrorDocument requires two parameters, code and URL. If you omit that, it still generates the "ErrorDocument xxx" token, which would result in an internal server error if you attempted to access your site.
- Same goes for the user-agent rewrite rules. If your browser is one of those unfilled items in the generator, you will be redirected unconditionally to the index.
- Allow/deny, again if you omit some information, it'll throw an ISE. It needs an IP address or collection of in order to make sense to Apache.
This generator isn't a bad start, but the author should have done some input validation and generated the rules from there. If the end-user omitted a few items here and there, it can easily throw the casual user for a loop. Overall is this a bad idea? No, but it needs a bit of work before I'd recommend using it.
If you do get a random internal server error (550), check your error_log, which is usually somewhere under /var/log/ for your site. There's a good chance you omitted a field and the generator naively processed it.
As for the recommendation about putting the configuration in the main Apache configuration in httpd.conf, yes that's generally the way to go. Apache recommends this setup due to performance. By default, with a request, for each directory that the AllowOverride directive is set, Apache must recursively check and run any .htaccess files prior to running the .htaccess in the current directory of the page request. This can result in needless overhead when processing a request. For that reason, it's recommended users make the configuration in the main Apache config file if they have access. - barthook, on 10/12/2007, -3/+1Great resource. I have been looking for something like this.
- spinesplitter, on 10/12/2007, -3/+0onion route to it...
- Fatalis, on 10/12/2007, -6/+3I'm using lighttpd and never going back to Apache.
- antigoogle, on 10/12/2007, -5/+2yet another .htaccess generator!
- loonysalmon, on 10/12/2007, -6/+2this is badass. Thanks
- rYno, on 10/12/2007, -6/+2Oh this is nice.... DIGG!!!
- ileadyouth, on 10/12/2007, -8/+2Or...you...could....make your own?
Seriously, is .htaccess that hard to create? I would rather create my own than waste more time to have it generated after filling out a form....
Or is it laziness (unfortunately a common sight amongst todays 'web developers') - bcoughlin, on 10/12/2007, -11/+1a few questions?
- inactive, on 10/12/2007, -98/+10if so hgreat can it genreate mi panmts bakc on if u slip ***** down!!!


What is Digg?