码迷,mamicode.com
首页 > Windows程序 > 详细

YII2.0 Restful API 记得配置服务器重写规则哦

时间:2018-01-23 00:49:29      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:serve   blog   log   server   rewrite   file   director   bsp   dex   

<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>

 

YII2.0 Restful API 记得配置服务器重写规则哦

标签:serve   blog   log   server   rewrite   file   director   bsp   dex   

原文地址:https://www.cnblogs.com/iceman-/p/8331424.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!