我已经在 windows server 2008 R2 上安装了 PHP、Mysql 和 Apache,因为这个链接完全提供了。
它就像一个魅力,但问题在于我的.htaccess
to remove index.php
。
我的.htaccess
文件包括以下内容:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /HR/ #Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
mod_rewrite
我已经在apache中启用了。但我收到 500 个内部服务器错误。
注意:当更改AllowOverRide All
为None
文档根目录时,如下所示:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
500 internal error
消失但不起作用.htaccess
!然后我应该添加index.php
链接才能工作。
注意:当AllowIverRide All
我收到此错误时:
[Tue Feb 19 18:20:10.988018 2013] [core:alert] [pid 3940:tid 844]
[client 127.0.0.1:49513] C:/Apache24/htdocs/HR/.htaccess:
RewriteBase takes one argument, the base URL of the per-directory context
任何帮助将不胜感激。泰。