用户
 找回密码
 入住 CI 中国社区
搜索
查看: 4963|回复: 3
收起左侧

[HELP] index.php文件隐藏出现内部服务器问题

[复制链接]
发表于 2013-11-25 17:58:11 | 显示全部楼层 |阅读模式
在根目录下.htaccess文件里写了
PHP复制代码
<IfModule mod_rewrite.c>  <Files ~ "^.(htaccess|htpasswd)$">  
deny from all  
</Files>  
 
Options -Indexes
Options +FollowSymLinks
 
#允许解析文件中的SSI指令
Options +Includes
 
#定义404,500错误页面
ErrorDocument 404 /404.htm
ErrorDocument 500 /404.htm
 
#定义目录索引页面
DirectoryIndex index.php
order deny,allow
 
RewriteEngine on
 
#设置根目录
RewriteBase www.liya.com/ci/
 
#去掉链接地址中index.php字符串  
RewriteCond %{REQUEST_FILENAME} !-f  
RewriteCond %{REQUEST_FILENAME} !-d  
RewriteCond $1 !^(index.php|images|robots\.txt)  
 
RewriteRule ^(.*)$ index.php/$1 [L]  
 
</IfModule>  
复制代码

也将config文件的$config['uri_protocol']        = 'ORIG_PATH_INFO';设置成这样。
appache的地址重写功能也打开了。网页地址是配置的虚拟机如下:
PHP复制代码
 
<VirtualHost *:80>
    ServerAdmin [email]webmaster@dummy-host3.example.com[/email]
    DocumentRoot "E:/wamp/www/liya"
    ServerName www.liya.com
    ServerAlias liya.com
    ErrorLog "logs/dummy-host3.example.com-error.log"
    CustomLog "logs/dummy-host3.example.com-access.log" common
</VirtualHost>
 
复制代码

但是在访问的时候就会出现内部服务器错误
主要显示错误如下:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@dummy-host3.example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.



该问题已困扰我一天了,望各位大神给予意见,不甚感激。
发表于 2013-12-4 15:05:20 | 显示全部楼层
可能是没配置好规则。这个要一步步调试啊。
发表于 2013-12-4 21:13:10 | 显示全部楼层
还是想问一下,你的具体问题是什么?而且看起来你是用的集成的环境,下面那个网页地址配置也没有必要吧,不过可以参考一下http://blog.sina.com.cn/s/blog_5b1acf750101foyg.html
发表于 2014-1-29 20:06:49 | 显示全部楼层
这里有问题:
  1. Options -Indexes
  2. Options +FollowSymLinks

  3. #允许解析文件中的SSI指令
  4. Options +Includes
复制代码

应该改为:
  1. Options All -Indexes
  2. Options All +FollowSymLinks

  3. #允许解析文件中的SSI指令
  4. Options All +Includes
复制代码

现在你再试试?

本版积分规则