码迷,mamicode.com
首页 > 其他好文 > 详细

yii 虚拟主机

时间:2015-11-16 12:33:41      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:

<VirtualHost *:80>
    ServerName www.mywap.com
    DocumentRoot "D:/wampserver/www/yii_backend/"
    <Directory "D:/wampserver/www/yii_backend/">
        DirectoryIndex index.php index.php3 index.html index.htm
        #重写需加以下第一行
        AllowOverride All 
        Options Indexes FollowSymLinks
        Order Allow,Deny
        Allow from all
    </Directory>
</VirtualHost>




.htaccess文件:

RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /index.php/$1

 

 

‘urlManager‘=>array(
‘urlFormat‘=>‘path‘,
‘showScriptName‘ => false, //注意false不要用引号括上
‘rules‘=>array(
  ‘login/login/‘ => array(‘login/login/‘, ‘urlSuffix‘=>‘.html‘, ‘caseSensitive‘=>false),

  ),

),

 

yii 虚拟主机

标签:

原文地址:http://www.cnblogs.com/weishuan/p/4968427.html

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