Advertisement
Queses

Yii2 VHOST

Jan 26th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.62 KB | None | 0 0
  1. <VirtualHost *:80>
  2.     DocumentRoot "C:\Files\ApacheWeb\milkom\web"
  3.     ServerName "milk.localhost"
  4.     ServerAlias "milk.dev"
  5.     <Directory "C:\Files\ApacheWeb\milkom\web">
  6.         AllowOverride All
  7.         # use mod_rewrite for pretty URL support
  8.         RewriteEngine on
  9.         # If a directory or a file exists, use the request directly
  10.         RewriteCond %{REQUEST_FILENAME} !-f
  11.         RewriteCond %{REQUEST_FILENAME} !-d
  12.         # Otherwise forward the request to index.php
  13.         RewriteRule . index.php
  14.        
  15.         # if $showScriptName is false in UrlManager, do not allow accessing URLs with script name
  16.         RewriteRule ^index.php/ - [L,R=404]    
  17.     </Directory>
  18. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement