标签:
<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),
),
),
标签:
原文地址:http://www.cnblogs.com/weishuan/p/4968427.html