A while ago I wrote two posts, one on using Twig and another on using htaccess with Mac's Apache. I was reasonably happy with the described setups until I discovered that when I used something like <link rel="stylesheet"href="/style.css"media="all"> in my HTML it wouldn't work because my site was running at the default http://localhost/~heleen/website/index.html and so it would map the 'root' slash to http://localhost/ rather than http://localhost/~heleen/website/. I found a solution to this using vhosts, which works really well. But then I had to add another website, and another, and realised that surely there should be an easier way …continue.
Add DocumentRoot "/Users/[your-username]/Sites/" at the top of the file;
Add FollowSymLinks to the Options;
Change AllowOverride None to AllowOverride All;
Change Deny from All to Allow from All.
Original:
<Directory "/Users/[your-username]/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Deny from All
</Directory>
New:
DocumentRoot "/Users/[your-username]/Sites/"
<Directory "/Users/[your-username]/Sites/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from All
</Directory>
For the project I am currently working on at my job I needed to make some HTML page mock-ups. The HTML and CSS were already available within the current version of the website, I just needed to restructure the content a bit and make a few mock-ups of it to see what sort of issues we'd run into.
Initially I just copied the HTML and replaced the old content with the new content. Then I made another copy and replaced it with different content. I then realised what I needed was a tempting system. If I was going to make 10 …continue.