我将index.php从CodeIgniter中的URL中删除。我已经更改了.htaccess文件数据。但是,我想知道是否有其他方法从index.php或任何其他.htaccess数据中删除该URL。意味着这只是一种方法。
在.htaccess文件中,我写了以下内容:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]发布于 2014-05-27 13:32:37
试试这个:
确保已在Apache模块上启用了rewrite_module。
.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|indexcp\.php?|resources|robots\.txt)
RewriteRule ^([A-Za-z0-9_/.-]+)$ index.php?/welcome/$1开放config.php :-
$config['index_page'] = '';
$config['base_url'] = 'http://www.example.com/'; //your site name
$config['uri_protocol']= 'REQUEST_URI';https://stackoverflow.com/questions/23890371
复制相似问题