htaccess 文件遇到错误

发布于 2024-10-03 12:05:26 字数 430 浏览 1 评论 0原文

当我在项目中包含 htaccess 文件时,出现错误。

我正在使用 php 和 mysql。

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

Rewritebase /xyz/ 

# For UI Start

### For Index page 
RewriteRule ^index$ index.php [NC,L]
RewriteRule ^index/$ index.php [NC,L]

这是我的 htaccess 文件代码。

我正在与 WAMP 合作。

它给出了错误内部服务器错误。

谢谢

when i am includeing htaccess file in my project, it gives an error.

i am using php and mysql.

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

Rewritebase /xyz/ 

# For UI Start

### For Index page 
RewriteRule ^index$ index.php [NC,L]
RewriteRule ^index/$ index.php [NC,L]

This is my htaccess file code.

i am working with WAMP.

it gives an error Internal Server Error.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

秋叶绚丽 2024-10-10 12:05:26

最好的办法是查看错误日志文件,但我假设您无权访问该文件。

首先,确保服务器上安装了 mod_rewrite

尝试仅放入

RewriteEngine On

htaccess 文件中。如果失败并返回 500,则 mod_rewrite 将关闭,您需要与您的提供商联系。

The best thing to do would be to look into the error log file, but I assume you have no access to that.

First of all then, make sure mod_rewrite is installed on the server.

Try putting only

RewriteEngine On

into the htaccess file. If that fails with a 500, mod_rewrite is turned off and you need to talk to your provider.

北方的巷 2024-10-10 12:05:26

您不需要包含 htaccess 文件。只需将其放在适当的位置即可。我确信这是你第一次。

You need not include htaccess files. just put it in proper place. I am sure this is your first time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文