Discover the best of the web!
Learn more about Digg by taking the tour.
.htaccess Generator
cooletips.de — This is a great page for any website owner/creator. It asks a few questions, and then will generate a nice clean .htaccess file for you.
- 1709 diggs
- digg it
- Arbinshire, on 10/12/2007, -4/+10Seriously sweet.
- Marco, on 10/12/2007, -99/+10if so hgreat can it genreate mi panmts bakc on if u slip ***** down!!!
- macfanboi, on 10/12/2007, -2/+16Marco - Rosetta Stone is your friend.
This is a good find. - loonysalmon, on 10/12/2007, -3/+5sounds like you're having a great day
- 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...
- indranil, on 10/12/2007, -0/+1Such an interesting view into your mind!
- macfanboi, on 10/12/2007, -2/+16Marco - Rosetta Stone is your friend.
- Arbinshire, on 10/12/2007, -4/+39@marco - Put. The. Crack. Pipe. Down.
- M4RSH4LL, on 10/12/2007, -10/+15Wouldn't this be a security issue?
- Yarnage, on 10/12/2007, -1/+2How would this be a security issue?
- 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.
- Adoozie, on 10/12/2007, -0/+5No. There's nothing secret about how .htaccess files work.
- 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.
- 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 - 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. - scsikool, on 10/12/2007, -2/+6Why give M4RSH4L a thumbs down? It's a fair question deserving of a fair answer.
- bcoughlin, on 10/12/2007, -11/+1a few questions?
- 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?
- Adoozie, on 10/12/2007, -3/+11.htaccess files are only for Apache, yes. But why would you use IIS?
- 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
- cyanidenfs, on 10/12/2007, -0/+9its seriously disorganised. but still, dugg for the great idea :)
- rYno, on 10/12/2007, -6/+2Oh this is nice.... DIGG!!!
- DuttonLake, on 10/12/2007, -0/+4I have seen other .htaccess generators, they usually only have 10% of the features that this one has.
- loonysalmon, on 10/12/2007, -5/+2this is badass. Thanks
- barthook, on 10/12/2007, -3/+1Great resource. I have been looking for something like this.
- beatmix01, on 10/12/2007, -1/+6i have used others in the past... but this one... this is the BMW of htaccess gens... vroooom!
- 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!
- D14BL0, on 10/12/2007, -2/+2I run a small gaming website (small = ~70 members), so this is VERY helpful to me. Awesome 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')- dharm, on 10/12/2007, -5/+4agreed...
it takes me longer to go through the forms than type up a .htaccess file... - 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.
- 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. - D14BL0, on 10/12/2007, -0/+3Oh, if only EVERY webmaster were as arrogant as you. The Internet would be a joyous realm, indeed.
/sarcasm
- dharm, on 10/12/2007, -5/+4agreed...
- 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!
- JoeAverage, on 10/12/2007, -1/+1Awesome, this is a great tool.
- recover, 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...- 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.
- wired4u, on 10/12/2007, -0/+1this is great +digg
- 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+
- spinesplitter, on 10/12/2007, -3/+0onion route to it...
- 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.
- 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?
- tymonn, on 10/12/2007, -0/+2thank you man,
awsome work :) - 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
- 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. - studiorats, on 10/12/2007, -0/+1sweet.
- 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 - 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/
Digg is coming to a city (and computer) near you! Check out all the details on our