这是矿井路由目录.htaccess文件
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php/$1 [L]
该应用程序仅适用于我更改的回家路线$route['default_controller']='home';$route['default_controller']='login';但不起作用
您需要确保在服务器上启用了rewrite_module
sudo a2enmod rewrite
然后重新启动您的apache
sudo systemctl restart apache2
然后将其添加到sites-available
下的配置文件中
<VirtualHost *:80>
<Directory /var/www/SITE_DIRECTORY>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
. . .
</VirtualHost>
最后将RewriteEngine on
添加到您的.htaccess
中