<VirtualHost *:80>
ServerName api.apitpl.dev
DocumentRoot "/Users/michaelweixi/WWWRoot/apitpl/api/web/"
<Directory "/Users/michaelweixi/WWWRoot/apitpl/api/web/">
# use mod_rewrite for pretty URL support
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
# use index.php as index file
DirectoryIndex index.php
# ...other settings...
</Directory>
</VirtualHost>