【发布时间】:2015-11-23 19:32:09
【问题描述】:
所以我使用了一个我在这里搜索过的 .htaccess 文件,我使用这个:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
根据需要删除 index.php 文件。我在 codeigniter 目录中有 .htaccess 文件。使用带有斜杠的此链接可以正常显示网站:
http://localhost/codeigniter/home/
但是在 home.php 之后转到链接但没有斜杠显示我的网站看起来没有链接到 css 文件。有什么建议么?
另外,在我的config.php 文件中,我编辑了索引页:
$config['index_page'] = "";
如果这有什么不同的话。
【问题讨论】:
标签: php apache .htaccess codeigniter