- Published:
- November 1, 2008 – 9:56 pm
- Author:
- By Dave
If you are running Apache for your web server, and mod_rewrite is installed (this is a pretty typicaly module on all installations) this is actually pretty easy.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain\.yourdomain\.com
RewriteRule ^(.*)$ http://www\.yourdomain\.com/subdomain/$1 [L]
Add this code to your apache configuration file – the easiest location is in the .htaccess file in your root web directory. This [...]
Categories: Code Samples, Linux, Other Code, Software
Tagged: apache, mod_rewrite, web server
- Published:
- May 29, 2008 – 9:46 am
- Author:
- By Dave
The AskApache blog has a great comprehensive guide to .htaccess. A must read for anyone who does a lot of work with Apache.
http://www.askapache.com/htaccess/apache-htaccess.html
Categories: Code Samples, Configurations, Linux, System Administration
Tagged: apache, htaccess, web server
- Published:
- March 6, 2008 – 12:31 pm
- Author:
- By Dave
If you upload those new fancy-shmancy file formats to your web server – namely .docx, .pptx and .xlsx – and you are running Apache; chances are that your web server doesn’t know how to serve those files because they are unknown file formats. Your browser may try to download them as a .zip file (IE) [...]
Categories: Configurations, Linux
Tagged: apache, Apache server, content types, microsoft, mime, mime.types, office, web browser, web server, XML
- Published:
- January 30, 2008 – 8:01 am
- Author:
- By Dave
The goal here is to watermark all images in a certain directory, except for thumbnails or other selection. You can either do this on each file prior to placing on your webserver – which is probably wise for CPU load issues – but let’s just say you want to do this for all files [...]
Categories: Code Samples, PHP
Tagged: apache, gallery, gif, htaccess, jpeg, no cache, PHP, USD, watermark, web server