-
Notifications
You must be signed in to change notification settings - Fork 42
/
isle.local.conf
executable file
·35 lines (32 loc) · 1.28 KB
/
isle.local.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName isle.local
ServerAlias www.isle.local
DocumentRoot /var/www/webroot
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /var/www/webroot>
Options Indexes FollowSymLinks
AllowOverride Limit
</Directory>
<Directory /var/www/webroot/isle>
Options FollowSymLinks
php_value short_open_tag 1
RewriteEngine on
RewriteBase /myinstance/
# maps versioned css and js files. styles.010314040503.css -> styles.css
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L]
# maps /controller/action to /controller.php?action=action
RewriteRule ^([a-z]+)/(([a-z0-9]+)|([0-9]+\.[0-9]+(\.[0-9]+)?))$ $1.php?action=$2 [NC,L,QSA]
# maps /controller to /controller.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([a-z]+)$ $1.php [NC,L,QSA]
# if user leaves on a trailing slash redirect them to the page without it.
RewriteRule ^(.*)/$ $1 [R,QSA]
# External request made to a file with a php extension gets sent a file not found 404 error.
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.+\.php
RewriteRule ^ %{REQUEST_URI} [R=404]
</Directory>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet