1. ../.htaccess增加
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
2. 在../application/config/config.php
$config['index_page'] = ''; 原:'index.php'
$config['index_page'] = ''; 原:'index.php'
3. vim httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so => 去掉#
AllowOverride None=> AllowOverride All
At Ubuntu 16.04
aptitude reinstall apache2.2-common
a2enmod headers
sudo a2enmod rewrite
service apache2 restart
AllowOverride None=> AllowOverride All
At Ubuntu 16.04
aptitude reinstall apache2.2-common
a2enmod headers
sudo a2enmod rewrite
service apache2 restart
沒有留言:
張貼留言