apache中的文件夹未解释html

时间:2018-07-10 16:16:05

标签: html css

我在apache中的文件夹有问题,某些文件夹正确显示了html代码,而另一些则向我显示了代码,我不想看到该代码,我在该文件夹中创建的任何文件都向我显示了代码,如您在下一个示例中看到的:

https://www.midominio.net/rsarchivos/gabriel.html

在其他任何文件夹中,我都可以看到正确的代码,例如:

https://www.midominio.net/admin/gabriel.html

您只能在此代码上看到它的html代码:

<!DOCTYPE html>
<html>
<head>
<title>
Hola Mundo
</title>
</head>
<body>
<p>Hola Mundo</p>
</body>
</html>

在此文件或任何其他标记中没有其他库被调用。有什么建议可以解决吗?

2 个答案:

答案 0 :(得分:0)

检查apache虚拟主机或主配置:

<table style="width:600px;height:1726px;table-layout:fixed;display:block;border:none;clear:both;" class="magic" width="600">
<tr class="GradeHead" style="height:198px;background:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/5827ac1b-050b-4752-9f9f-728e05e3170b.png') no-repeat 0px 6px;">
	<td colspan="4" style="height:198px; width:600px;">
	  <h2 style="display:none;">You're always up to speed</h2>
	</td>
</tr>
<tr style="" class="g-row g-row-2">
	<td class="option" colspan="2" width="300" style="width:300px;text-align:center;" >
	  <h3>HEADLINE </h3>
	  <p>COPY</p>
	  <a href="#" class="btn-white">Explore</a>
	</td>
	<td colspan="2" class="cover boys" width="300" style="width:300px;height:300px;background:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/8d7b0292-bd08-4b33-87aa-0f56c86b24e3.png') no-repeat;">
	 
	</td>
</tr>
<tr style="" class="g-row g-row-3">
	<td colspan="2" width="300" class="cover ship" style="width:300px;height:300px;) no-repeat;">
	 
	</td>
	<td  class="option" colspan="2" width="300" style="width:300px;text-align:center;">
													  <h3>HEADLINE </h3>
	  <p>COPY</p>
	  <a href="#" class="btn-white">Explore</a>
	</td>
</tr>
<tr style="" class="g-row g-row-4">
	<td class="option" colspan="2" width="300" style="width:300px;text-align:center;">
													  <h3>HEADLINE </h3>
	  <p>COPY</p>
	  <a href="#" class="btn-white">Explore</a>
	</td>
	<td class="cover resort" colspan="2" width="300" style="width:300px;height:300px;background:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/ecd8b1b9-fed4-42f8-a262-1f769323d7da.png') no-repeat;">			   
	</td>
</tr>
<tr style="height:180px;">
	<td colspan="4" style="background:url('https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/d176648a-185c-415d-986e-545b427b1812.png') no-repeat 0px -1px;">
	  <h2 style="display:none;">Connect with us: @myvacaya</h2>
	</td>
</tr>
<tr>
	<td>
	  <a href="https://instagr.am/myvacaya"><img src="https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/43334793-5066-4ead-accb-a1bfcf81e6b1.png" alt="A well dressed man celebrating"></a>
	</td>			<td>
	<a href="https://twitter.com/myvacaya"><img src="https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/eaea60f1-f4ba-44f2-9175-789386790126.png" alt="A group of partygoers in the sun" style="margin-bottom: 24px;"></a>
	</td>
	<td>
	<a href="https://facebook.com/myvacaya"><img src="https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/08329669-dc4e-423d-8769-acb741cf5824.png" alt="A group of mixed race friends at the beach" style="margin-bottom: 24px;"></a>
	</td>
	<td>
	<a href="https://www.youtube.com/channel/UCTMhOkIDdThzifl_-ly2PAQ"><img src="https://gallery.mailchimp.com/88f8ea77021bbc9d2f53d5229/images/3dd02748-8597-42df-8bb4-6817f959337c.png" alt="A woman in a sun hat drinking from a straw" style="margin-bottom: 24px;"></a>
	</td>
</tr>
<tr>
	<td colspan="4">
	<a href="https://www.myvacaya.com/discover/faqs/?utm_source=welcome-sub&amp;utm_medium=email&amp;utm_content=welcome-faqs" class="btn-purp" style="width:300px;margin:15px auto;">Qs? WE'VE GOT As</a>
	<a href="https://myvacaya.com/?utm_source=welcome-sub&amp;utm_medium=email&amp;utm_content=lets-do-this" class="plus btn-pink" style="width:400px;margin:15px auto;">LET'S DO THIS</a>
	</td>
</tr>
</table>

添加.html DirectoryIndex以在子文件夹中呈现html。

答案 1 :(得分:0)

所有问题是我保存了.htaccess文件并将其隐藏在受影响的目录中。我只是删除该文件,问题就解决了!

感谢社区的帮助!