-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathapache-vhost.conf
More file actions
29 lines (21 loc) · 792 Bytes
/
apache-vhost.conf
File metadata and controls
29 lines (21 loc) · 792 Bytes
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
<VirtualHost *:80>
SetEnv ROOT_DIR "/path/to/install"
ServerName an.example.com
DocumentRoot "/path/to/install/public"
ErrorDocument 404 /index.php
Redirect 404 /favicon.ico
<Directory /path/to/install/public>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride None
Order allow,deny
Allow from all
RewriteEngine on
# Strip trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [R=permanent,L]
# Simulate MultiViews
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,QSA]
</Directory>
</VirtualHost>