简体   繁体   English

在1and1上安装Concrete 5后,无法再访问列表目录文件的htaccess

[英]htaccess to list directory files no longer works after Concrete 5 installation on 1and1

I am working on an old website built on a Linux package hosted on http://1and1.com . 我正在一个基于http://1and1.com托管的Linux软件包构建的旧网站上工作。

The site has many directories and subdirectories. 该站点有许多目录和子目录。 For numerous, various subdirectories throughout the site where we wished to list the directory contents, we created .htaccess files with a single line: "Options +Indexes" 对于我们希望列出目录内容的站点中的众多子目录,我们用单行创建了.htaccess文件:“ Options + Indexes”

Recently, Concrete5 was installed. 最近,安装了Concrete5。 Since the installation, all subdirectories with the .htaccess file no longer list the directory contents. 自安装以来,带有.htaccess文件的所有子目录不再列出目录内容。 Instead, Concrete 5 now serves the following error page: 相反,Concrete 5现在提供以下错误页面:

"Page Not Found No page could be found at this address. Back to Home." “找不到页面。在此地址找不到页面。返回首页。”

I have searched the web to find a way to enable the .htaccess files with the Concrete5 installation to no avail. 我在网上搜索,找到了一种方法,无法在安装Concrete5时启用.htaccess文件。 Note that we do NOT want all subdirectories to list directory contents, only those that have the .htaccess file. 请注意,我们不希望所有子目录列出目录内容,仅列出具有.htaccess文件的目录。 We also prefer not to install any additional Concrete5 Add-ons. 我们也不希望不安装任何其他的Concrete5附加组件。

How do we enable the .htaccess files to coexist with the Concrete5 installation? 我们如何使.htaccess文件与Concrete5安装共存? Is there a switch or configuration file that needs to be modified within Concrete5 to allow the .htaccess file to do its job? 在Concrete5中是否有需要修改的开关或配置文件才能允许.htaccess文件执行其工作?

I don't think Concrete5 has any problem with htaccess in general. 我认为Concrete5总体上与htaccess无关。 I would guess the problem is elsewhere. 我猜问题出在其他地方。 I am not too clear on what you have right now. 我不太清楚你现在拥有什么。 Was Concrete5 installed alongside those other directories? 是否在其他目录旁边安装了Concrete5? Inside one of them? 在其中一个里面?

Also to be clear you say the problem is double: 1- files are not listed anymore in directories with the htaccess 2- Concrete5 keeps not finding any page Is that correct? 同样要明确的是,您说的问题是双重的:1-使用htaccess的目录中不再列出文件2- Concrete5始终找不到任何页面正确吗?

Do you have an htaccess file at the root of the Concrete5 directory? 您在Concrete5目录的根目录中是否有htaccess文件? Maybe a directive there creates the problem. 也许那里的指令会产生问题。

Really all C5 does, if asked, is add a directive to the root htaccess file to get pretty urls. 如果询问,实际上C5所做的全部就是向htaccess根文件添加指令以获取漂亮的url。 That might be the problem. 那可能是问题所在。 Other than that, I don't see how it could block htaccess directives. 除此之外,我没有看到它如何阻止htaccess指令。

Also the fact that C5 itself can't load a page makes me lean towards the "rogue htaccess file theory" 同样,C5本身无法加载页面的事实使我倾向于“流氓htaccess文件理论”

Well then I can only think of 2 things: 好吧,我只能想到两件事:

  1. make sure pretty url is not enabled in C5 确保在C5中未启用漂亮的网址
  2. your C5 folders need to be chmoded to allow file listing as usually they are restricted. 您的C5文件夹需要更改,以允许文件列表,因为通常它们是受限制的。

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

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