简体   繁体   English

没有htaccess重定向

[英]redirect without htaccess

i have a site that is on a darwin server. 我有一个达尔文服务器上的站点。

i dont see any .htaccess.(i can see .htaccess file in a different site on the same server.) 我看不到任何.htaccess。(我可以在同一服务器上的其他站点中看到.htaccess文件。)

yet it redirects /file to /file.php 却将/ file重定向到/file.php

how is this done? 这是怎么做的?

This could well be defined in the central httpd.conf file. 这很可能在中央httpd.conf文件中定义。 .htaccess is only a local representation of Apache's central configuration. .htaccess只是Apache中央配置的本地表示。

Also, the .htaccess file could be in a folder above the web root. 此外, .htaccess文件可能位于Web根目录上方的文件夹中。

In the httpd.conf or vhosts file, for the options under the domain MultiViews is most likely there. 在httpd.conf或vhosts文件中,最有可能存在域MultiViews下的选项。 This is what causes it and is called Content Negotiation . 这就是导致这种情况的原因,称为内容协商

You should be able to confirm confirm it is Apache's MultiViews doing this by disabling it with 您应该能够通过禁用它来确认是否是Apache的MultiViews。

Options -MultiViews

in a .htaccess file in the directory in question. 在相关目录中的.htaccess文件中。 MultiViews can also cause issues with rewrites... MultiViews也可能导致重写问题...

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

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