简体   繁体   English

index.html index.php重定向+内部服务器错误

[英]index.html index.php redirection + Internal Server Error

I'm using a mac, FTP is with Transmit. 我使用的是Mac,FTP已传输。 I am doing a website for a client on Wordpress. 我正在为Wordpress上的客户建立网站。 The site is finished but my client wanted to add another page in front of the website so when you click on the URL in Google, you have a page with their logo which you click and then access to the wordpress website. 该站点已完成,但是我的客户希望在该站点的前面添加另一个页面,因此,当您单击Google中的URL时,您将获得一个带有其徽标的页面,您可以单击该页面,然后访问wordpress网站。

So : I created a index.html with dreamweaver pointing to "http://www...." and I uploaded it in the FTP. 所以:我用dreamweaver创建了一个index.html,指向“ http:// www ....”,并将其上传到FTP中。 The index.php of the wordpress site points also to that same address. WordPress网站的index.php也指向同一地址。

I added this code here in the .htaccess file: 我在.htaccess文件中添加了以下代码:

DirectoryIndex index.html index.php

I then had to replace the index.html by another one (same but the content image is just bigger to have full width) and removing the old one. 然后,我不得不将index.html替换为另一个(相同,但内容图像更大以具有完整宽度)并删除旧的。 And now nothing seems to point, or there a duplicate problem! 现在似乎没有任何意义,或者有重复的问题! I have the "Internal Server Problem, error 500". 我有“内部服务器问题,错误500”。

So there, the word is out! 所以,这个词出来了! Thank You! 谢谢!

What exactly is wrong is hard to tell without knowing the error. 确切的错误在不知道错误的情况下很难告诉。 If you have access to any apache log files, the error.log will tell you why it's outputting an error. 如果您有权访问任何Apache日志文件,则error.log会告诉您为什么输出错误。

A HTTP 500 status can be any kind of error, but in my experience it is most commonly due to: HTTP 500状态可以是任何类型的错误,但是根据我的经验,这最常见的原因是:

  • Incorrect file permissions on some files 某些文件的文件权限不正确
  • syntax error in the .htaccess file or httpd.conf (which I'm guessing you don't have access to) .htaccess文件或httpd.conf中的语法错误(我猜您没有访问权限)

If you are on a shared host and you do not have access to the apache error.log file or you don't know where it is, it would probably be a good idea to contact the sys admin or support and ask why you're getting the error or ask where you can find the error.log file 如果您在共享主机上,但是无法访问apache error.log文件,或者您不知道它在哪里,最好联系sys管理员或支持人员,并询问您为什么要访问apache error.log文件。收到错误或询问您在哪里可以找到error.log文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM