1、问题
运行项目使出现The requested URL /regiser was not found on this server.
就是因为apache的重写未开启。
2、解决方法
1)、Linux下配置文件中
<Directory "/var/www/gongsc/public">
Options FollowSymLinks
DirectoryIndex index.php index.html index.htm
#注意这个地方的配置,会影响本地目录下的.htaccess的启用。使用 All
AllowOverride All
Order deny,allow
Allow from All
</Directory>
然后安装模块rewrite_module
sudo a2enmod rewrite
重启服务器
2)apache 打开 httpd.conf 文件
#LoadModule rewrite_module modules/mod_rewrite.so
去掉前面的#号
找到
<Directory "E:/online/webs/Apache24/htdocs">
Options Indexes FollowSymLinks
AllowOverride None =>改为 AllowOverride All
Order allow,deny
Allow from all
</Directory>