我的本地服務器上有一個sipmle php應用程序。我正在使用xampp。我正試圖從我的網址中刪除index.php。我在互聯網上查了很多文章,文件和問題,並嘗試了所有這些,但都沒有奏效。這裏是我的.htaccess文件:Codeigniter Xampp刪除index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
,我已修改了config.php文件這些行:
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
和修改httpd.conf中:
ServerName localhost:8080
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>
...
DocumentRoot "C:/Projeler"
<Directory "C:/Projeler">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
感謝提前。
我試過了,但沒有奏效。 –