Archive for the ‘Apache’ Category

Force a File to Display Instead of Executing

Monday, November 5th, 2007

If you’re like me, you run a site written in PHP. Sometimes I offer PHP scripts to my readers and want them to be able to download them, but if I post a link, the script is executed instead. You can prevent this action with a small .htaccess tweak.

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5 out of 5)
Loading ... Loading ...

Force Files to Download Instead of Opening

Monday, November 5th, 2007

Have ever wished that you could force a file to download instead of opening in a browser? Some common files like MP3s and PDFs will open in your reader’s browser if the proper parent plugin is installed. Sometimes you want to force them to download the file without having to right-click and save […]

1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5 out of 5)
Loading ... Loading ...

Creating a Catchall Subdomain in Apache

Wednesday, July 11th, 2007

Let’s assume for a minute that you have a dynamically created site. You have an unknown amount of users creating accounts on your site. Each user account is created in a subdirectory on your site and you would like to provide your users with a subdomain for their account. In other words, […]

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5 out of 5)
Loading ... Loading ...