给人的.htaccess在localhost 500错误 [英] .htaccess gives 500 error on localhost

查看:192
本文介绍了给人的.htaccess在localhost 500错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是初学者MVC框架。我试图创建一个自己的基于教程。

他们提供的

.htaccess文件包括:

  RewriteEngine叙述在
的RewriteCond%{} REQUEST_FILENAME!-d
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-l
重写规则^(。+)$的index.php?URL = $ 1 [QSA,L]

我得到500服务器错误:服务器遇到一个内部错误,无法完成您的请求。无论是服务器过载或出现在CGI脚本错误。

我检查httpd.conf中,以检查是否mode_rewrite没有评论。任何人都可以帮助我吗?我使用LAMPP在Ubuntu 12.04


解决方案

 的RewriteRule ^(。+)$的index.php?URL = $ 1 [QSA,L]

更改为:

 的RewriteRule ^(。+)$的index.php?URL = $ 1 [QSA,L]

请注意,[QSA,L]与[QSA,L]

重复的你的错误,删除空间,工作)。我使用WAMP。

i'm beginner to MVC framework. I'm trying to create one my own based on tutorials.

.htaccess file that they provide contains:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA, L]

i get 500 server error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

I checked httpd.conf to check if mode_rewrite was not commented. Can anyone help me please? i'm using LAMPP on Ubuntu 12.04

解决方案

RewriteRule ^(.+)$ index.php?url=$1 [QSA, L]

Changed to:

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

Note, "[QSA, L]" vs. [QSA,L]

Duplicated your error, removed space, worked). I'm using WAMP.

这篇关于给人的.htaccess在localhost 500错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆