我已经安装了Yii 2高级模板。我在前端/config/web:中有这个
'components' => [
.......
'urlManager' => [
'class' => 'yii'web'UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false
],
在前端/config/web/.htaccess文件中:
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward it to index.php
RewriteRule . index.php
在wamp''bin''apache2.4.9''conf目录下的Apache Alias文件中:
Alias /furni/ "D:'Dev.2014'furni/"
<Directory "D:'Dev.2014'furni/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require local
Require ip 192.168.1
Require all granted
</Directory>
尝试在Wamp-apache文件夹中的httpd.conf中进行更改,然后重新启动服务器。没用!
mod_rewrite已启用。所以我在这里,除了"黎明醒来问她为什么"之外别无选择:)。需要帮助。
在Apache配置中使用虚拟目录或Alias时,必须添加
RewriteBase /furni/
在.htaccess文件