在根目录下.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 ErrorThe 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.
该问题已困扰我一天了,望各位大神给予意见,不甚感激。
|