enjoylife's Stuff

Home » enjoylife (2 trails)
enjoylife's Stats (public trails only):
Trails created: 80
Marks created: 1259
Views received: 103,624
Positive ratings: 1
Negative ratings:
Comments received: 3
Comments left: 0
super master (enjoylife)

enjoylife's Trails: htaccess    (view all)

.htaccess file is the configuration file for the Apache Web Server that provides a number of directives for configuring Apache and Apache Modules

If you look around the site you’ll notice .htaccess tricks that nobody else has, .htaccess tricks that push the limits. This isn’t an introduction to .htaccess, this is the evolution of .htaccess files for your website.

Here’s just one example of the tricks throughout these pages, this shows how you can enable password protection for your site, and how you can not only verify the username/password, but also log both failed and successful login attempts! Here’s a chart explaining

Tags: htaccess, here’s, isn’t, you’ll, tricks, ...
A trail of 3 pages

I love the Drupal CMS. One of my favorite features of Drupal is the ability to do a multisite install. This site and my other blog, i <3 stella, are hosted on the same box, using the same Drupal install. Several sites can share one codebase. Updates are easily rolled out to every site simultaneously. Overall, it's a wonderful idea. But I have some problems with the implementation...

The standard way to set up a multisite install is to point each of the domain names at the Drupal install folder and let Drupal sort out which domain each request is coming from. It does a good job, too. But this method introduces some complications. For example, any content uploaded to site a is accessible from site b. A user that visits http://site1.com/myimage.jpg will find the same image as she finds at http://site2.com/myimage.jpg. Websites can't have domain specific .htaccess or robots.txt files either, which might hurt search engine optimization of individual sites.

An interesting side effect of this is if you want to install something in a subdirectory of your site, for example a WordPress blog at http://site1.com/blog, that exact same WordPress blog will exist in its full glory at http://site2.com/blog...

Another, and perhaps more grave, problem is that all that stands between the interweb and your very own personal settings is an .htaccess file. Install scripts, includes, site configurations and database passwords are in web accessible directories, and that is never a good thing.

We'll look at one solution to these problems.

I assume here that you are using Linux hosting, that you have shell access, and that you have at least a passing acquaintance with symlinks. If you're looking for a webhost that meets these requirements, check out 1and1 shared hosting. I've been happy with them, and all of their packages above $9.99/mo will do what you need.

Microsoft/IIS guys, you can't do a symlink. You're looking for something called a junction... good luck with that.

Tags: install, http, jpg, htaccess, multisite, ...
A trail of 29 pages