使用thinkphp框架之后设置路由仍然是404问题
- 开启apache重写(conf/httpd.conf)
LoadModule rewrite_module modules/mod_rewrite.so
- 开启apache重写(conf/httpd.conf)
- 2.允许在任何目录中使用“.htaccess”文件,将“AllowOverride”改成“All”(默认为“None”):
<VirtualHost *:80>
DocumentRoot "/Users/xmg/Desktop/www/tp5/public"
ServerName www.tp.com
ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common
<Directory "/Users/xmg/Desktop/www/tp5/public">
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

网友评论