如何在 UBUNTU 中从 codeigniter 中删除 index.php
2022-08-30 22:32:55
我知道这个问题已经被问过了,我尝试了所有这些,但仍然无法从url中删除索引.php。这是我的详细信息
Ubuntu 12.10
PHP : 5.4.6
Mod_rewrite in on
CI verson: 2.1
.htacess 看起来像这样:
RewriteEngine On
RewriteBase /projectname
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
我也看了下面的链接,但没有运气。无法从基于 URL CI 的站点中删除索引.php
如何删除 codeigniter 路径中的“index.php”
我的“/etc/apache2/sites-available/default”看起来像这样:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
任何帮助赞赏!