1.在apache配置文件 httpd.conf找到mod_rewrite.so ,去除前面的井号php
2.在多站点配置文件中(httpd_vhosts.conf)修改None为All,重启apacheapache
3.在项目根目录编写.htaccess文件内容为spa
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
4.在项目应用配置文件中(Application/Common/Conf/config.php
)写入code
return array(blog
'URL_MODEL'=>2 it
);io
配置完成.........class