30 Comments
- DeathRay2K, on 12/11/2008, -0/+12Right. Because it is.
- ABJ974, on 12/11/2008, -2/+11The Hotlinking protection is very useful thanks for putting that up.
- indyGuy, on 12/11/2008, -3/+11Good stuff. Never thought to block access to the .htaccess file. You'd think that would be a default apache setting...
- miked123, on 12/11/2008, -0/+7Is it really a "hack" if you're using something as intended?
- 007isbond1, on 12/11/2008, -1/+7/facepalm
- martyfarty, on 12/11/2008, -1/+7How are any of these "Hacks" ? They are all well documented features of Apache.....
- cloudberries, on 12/11/2008, -0/+52, 5, 7 - I did not know. I have learned things today! Huzzah!
- fugazied, on 12/11/2008, -0/+4Modifying php ini settings via htaccess is also handy... eg.
php_value upload_max_filesize 300M
php_value post_max_size 305M
php_value output_buffering on
php_value max_execution_time 1000
php_value max_input_time 1000 - AnalogCamera, on 12/10/2008, -2/+6That's pretty neat. A lot of that I didn't know, but they didn't mention how htaccess files could be used for proxies though.
- veronica1, on 12/11/2008, -3/+7Good, solid list of .htaccess hacks. Will employ soon. Thanks :)
- 007isbond1, on 12/11/2008, -0/+3/facepalm
- techdever, on 12/11/2008, -0/+3i like turtles
- Darthyoshiboy, on 12/11/2008, -0/+3These directives should all be taken care of in the httpd.conf, .htaccess should only be used in cases where you don't have access to the httpd.conf.
- DeathRay2K, on 12/11/2008, -1/+3I was surprised they didn't mention permanent/user-friendly URLs.
- cloudberries, on 12/11/2008, -0/+2Agreed. There does seem to be a distinct lack of URL rewriting on that there list.
- willfe, on 12/11/2008, -0/+2In short, no, they don't. .htaccess is an Apache-only thing.
I'd *love* to see a compatibility module added to Cherokee or lighttpd (an optional module, of course) to at least parse and attempt to implement options provided. An automated mod_rewrite handler (to translate those settings into the other web server's native syntax for redirects, etc.) would solve 95% of the "migration" problems most folks have. Relying on "recipes" to get certain apps/frameworks (think Drupal, Gallery2, Django, etc.) up and running with so-called "clean URLs" is a very error-prone way to train users/admins (especially when the configuration syntax for the alternate web server changes but the recipes don't get updated). - Natnie, on 12/11/2008, -1/+2They never taught me this at tech college.
.... actually, they didn't teach me much of anything. I learned most of what I know from books and the web. - apachehtaccess, on 12/18/2008, -0/+1Darthyoshiboy is correct. However, for those without access to the server config file, here's the deepdish: http://www.askapache.com/htaccess/apache-htaccess. ...
- harveywalbanger, on 12/12/2008, -0/+1I still don't recommend going hog wild and doing everything via .htaccess unless you are hosting pictures of your grandma on vacation @ ***** (GoDaddy) that no one will ever visit.
if you get more than 1000 hits per day, don't ***** up your server with piles of .htaccess files - that's like building an airplane out of ***** scotch tape (not even duct tape).
Hey Farthead (I'm not calling you sir), you should stick your head a little further up your ass. If you are using a cheap-ass hosting provider, they still provide things like custom error pages and you should always handle domains via DNS, NOT .htaccess.
Glad you aren't my network admin you hack! - inactive, on 12/11/2008, -0/+1Actually, I looked it up on Wikipedia a few hours ago because nobody actually answered my question and instead buried me (why?) and apparently a few servers do support a subset of .htaccess but not Cherokee or lightttp
- gdonald, on 12/11/2008, -0/+1Not all web clients provide HTTP_REFERER, so #6 will only get your boss yelling at you.
- 1to1, on 12/11/2008, -0/+1WE miss them in windows.... so sad
- asad296, on 01/04/2009, -0/+0Thanx so much for the info :)
- harveywalbanger, on 12/11/2008, -2/+1Wow. 99% of that can be handled with DNS records, apache config and virtual hosts.
.htaccess isn't all that great and I don't recommend using it as willy-nilly as this guy. - SirFlatulence, on 12/11/2008, -1/+0The apache config is quick and simple if you admin the server. On the other hand for the 99.9% of sites out there that use some kind of shared hosting managed by someone else htaccess is by far the best way to do this. Try asking for rewrite rules to be added to httpd.conf at one of the bargin basement hosting companies and you'll be lucky to even get a reply telling you to go away.
- inactive, on 12/11/2008, -8/+6Hey did you guys know 92% of women like to go solo ?
- bugmenottt, on 12/11/2008, -3/+1TOP 4 REASONS WHY YOU ABSOLUTELY MUST READ THIS COMMENT
1. HELLO MIKED123
2. I COME FROM THE PLANET BLOGOSPHERE
3. WHERE EVERYTHING COMES IN NUMBERED TOP LISTS
4. AND ANYTHING THAT ISN'T ACCESSIBLE BY BUTTON OR GUI IS A HACK - inactive, on 12/11/2008, -5/+2I'm too lazy to bother with .htaccess, but i'll bookmark this for later.
Do any other servers support .htaccess? I'm helping out on a site that uses lighttp and i was just curious. I know it's an Apache thing, but you never know, a smaller server might adopt it for compatibility. - rachelblack, on 12/11/2008, -4/+1Hey Thank you so much.... these tricks will help me lot...
- RocknFinRoll, on 12/11/2008, -3/+0Are you telling me you haven't heard?
www.TBITW.com


What is Digg?
Digg is coming to a city (and computer) near you! Check out all the details on our