Yii2框架的路由Apache域名配置

 1 <VirtualHost *:80>  
 2    ServerName saas.com  
 3    DocumentRoot "D:\xampp\htdocs\saas\frontend\web"  
 4   
 5    <Directory "D:\xampp\htdocs\saas\frontend\web">  
 6        # use mod_rewrite for pretty URL support  
 7        RewriteEngine on  
 8        # If a directory or a file exists, use the request directly  
 9        RewriteCond %{REQUEST_FILENAME} !-f  
10        RewriteCond %{REQUEST_FILENAME} !-d  
11        # Otherwise forward the request to index.php  
12        RewriteRule . index.php  
13   
14        # use index.php as index file  
15        DirectoryIndex index.php  
16   
17        # ...other settings...  
18    </Directory>  
19 </VirtualHost>  

 

posted @ 2018-04-02 18:51  huohuohiahia  阅读(424)  评论(0编辑  收藏  举报