Advertisement
salientdigital

Apache VirtualHost container for a Kohana site

Apr 1st, 2011
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.85 KB | None | 0 0
  1. <VirtualHost *:80>
  2.         ServerAdmin admin@domain.com
  3.         ServerName domain.com
  4.         ServerAlias www.domain.com admin.domain.com
  5.  
  6.         DocumentRoot /Users/username/Sites/domain.com/htdocs
  7.         ErrorLog /Users/username/Sites/domain.com/logs/error.log
  8.         DirectoryIndex index.php
  9.  
  10.         RewriteEngine On
  11.  
  12.         # Remove www alias
  13.         RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
  14.         RewriteRule ^(.+)$ http://domain.com$1 [R=301,L]
  15.  
  16.         RewriteCond %{REQUEST_URI} ^.+$
  17.         RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png|js|css|swf|php|txt|pdf|xml)$ [OR]
  18.         RewriteCond %{REQUEST_FILENAME} -f [OR]
  19.         RewriteCond %{REQUEST_FILENAME} -d [OR]
  20.         RewriteCond %{REQUEST_FILENAME} -l
  21.         RewriteRule ^ - [L]
  22.  
  23.         RewriteRule ^(.*)$ /index.php?kohana_uri=$1 [PT,L,QSA]
  24. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement