Categories
-
Recent Posts
- Configure CentOS Firewall From Command Line
- Add CentOS Package From Command Line
- Consume Web Service With Ruby
- Develop Web Service With Ruby on Rails
- Restore MySQL Database
- Install Ruby 1.8.5, Rails, FastCGI on OpenBSD 4.1
- Install MySQL 5.0 on OpenBSD 4.1
- Install Lighttp 1.4 w/ FastCGI on OpenBSD 4.1
- Quick UNIX Reference
- Backup File Using Amazon S3 And Ruby 1.8.4
- Backup MySQL Database
- Install WordPress on OpenBSD 4.0
- Make An ISO File From a CD in UNIX/Linux
- Install/Configure VMWare Server on CentOS
- Update All CentOS Packages From Command Line
Category Archives: Internet
301 Redirect With Lighttp 1.4
Direct all clean traffic using an exact match on the host.
$HTTP["host"] == “www.<example>.com” {
server.document-root = “/www/sites/<example>.com/www/”
}
Trap all traffic not directed to the main site (regex non-match), then filter remaining traffic headed to the correct domain with the wrong host (regex) and redirect to the main site.
$HTTP["host"] !~ “^(www|mail)\.(<example>\.com)$” [...]
Also posted in Lighttp, Search Engine Optimization Leave a comment
Backup File Using Amazon S3 And Ruby 1.8.4