there is a node "node/8" and an alias to this node "web".
when accessing "site.ext/node/8" http response code is 200, but with "site.ext/web" http response code is 404 (but the page is displayed correctly)

if rename the alias to something else (eg: webdesign) the http response code is then correct (200). renaming back to web give back 404.

for the user it's almost invisible but i fear the the search engines.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

Status: Active » Postponed (maintainer needs more info)

That's probably because of Apache Multiviews feature. We have a file named web.config for IIS, and Apache is serving web as a shorthand for web.config.

Can you try adding Options -Multiviews to your .htaccess or your Apache VirtualHost configuration?

mathroc’s picture

FileSize
293 bytes

that's it!
serving /web with response 200 :)

AnalogFile’s picture

Version: 7.0-alpha7 » 7.x-dev
Status: Postponed (maintainer needs more info) » Needs review

I do not think this change will be accepted. But I'm too new to Drupal to judge it.
Let's see what others think.

Damien Tournoud’s picture

Status: Needs review » Reviewed & tested by the community

Actually, I think it makes sense to disable Multiview by default. We just don't need it in Drupal, and it can make more harm then good.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, web-404.patch, failed testing.

AnalogFile’s picture

Status: Needs work » Needs review
FileSize
653 bytes

That patch was too old.
Try this.

dmitrig01’s picture

FileSize
673 bytes

very slight documentation fix (adding a period at the end, switching the grammar)

Stevel’s picture

Status: Needs review » Reviewed & tested by the community

This doesn't hurt anyone, and makes /web (and any other file-like url alias) work when MultiViews is enabled in the apache config files.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

ahaarnos’s picture

Status: Fixed » Needs review
Issue tags: +Clean URLS

The addition of Options -MultiViews to the .htaccess file with the D7 RC1 release is now causing Apache to choke on that line and cause 500 Internal Server Error for my D7 site (none of the other Options -Indexes, etc. lines cause this kind of error).

My server is running Apache with mod_negotiate compiled in, so the multiviews option should be available but for some reason it is not allowed to be adjusted in the .htaccess file.

I suggest this addition be reviewed and further tested, since it can obviously cause problems for some Apache configurations, and this Multiviews/cleanURLs issue has been around as long as I've been using Drupal.

amc’s picture

Title: alias to /web cause 404 http response ode » Alias to /web causes 404 http response code
catch’s picture

Status: Needs review » Active
Issue tags: -SEO, -404, -path, -Clean URLS, -alias

The need review status is for issues that have active patches to review, that's not the case here.

catch’s picture

Title: Alias to /web causes 404 http response code » -MultiViews in .htaccess may be incompatible with mod_negotiate

Re-titling.

chx’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

There is no mod_negotiate. If you mean mod_negotiation which I presume you do then Apache documentation says that

There are two implementations of this.

A type map
A MultiViews search (enabled by the MultiViews Options)

it does not say disabling MultiViews causes havoc, in fact it sounds like it totally should work. If it does not, we need your Apache configuration and version. Also note that we are not getting HTTP 500 bug reports by the hundreds even after release so I am downgrading this.

boombatower’s picture

FileSize
547 bytes

This breaks it on my default LAMP stack...based on reading the option only works if multiviews is enabled...would highly prefer this was removed...currently patching my d7 installs.

boombatower’s picture

Title: -MultiViews in .htaccess may be incompatible with mod_negotiate » -MultiViews in .htaccess requires odd AllowOverride Options=All,MultiViews
Status: Postponed (maintainer needs more info) » Needs review

Contrary to what you may think, the All parameter doesn’t really mean “[allow overriding] all options”, since it doesn’t include the MultiViews option! The key here is to use AllowOverride Options=All,MultiViews.

- http://mathiasbynens.be/notes/apache-allowoverride-all

The above fixed the problem for me...I had been just applying this patch, but gets old real fast after setting up a number of instances.

Having such an a-typical configuration requirement is just silly. Based on some other comments it sounds like this only occurs on Apache 2.2 and later which could be the reason we haven't gotten many reports. I don't know what generally is the accepted version, but seems new enough that plenty of hosts may not use it...

Either way can we please get rid of this.

dawehner’s picture

Perhaps it would be good to document this setting in the .htaccess but disable it by default.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Update status

ahaarnos’s picture

boombatower is exactly right about the Apache config issue (http://drupal.org/node/919596#comment-4061664). We don't have MultiViews enabled in my organization's Apache configurations anyways, but since AllowOverride ALL doesn't include MultiViews (which is stated all over the Apache 2.2 documentation), trying to disable it via .htaccess leads to 500 errors if you're not allowed to override that setting.

I haven't found any sort of conditional way to set an Apache option in .htaccess ONLY IF you have the right to, so I'd consider any default .htaccess that tries to change a setting specifically excluded from the All options set in Apache to be a bad idea.

boombatower’s picture

Version: 7.x-dev » 8.x-dev

Should probably commit to 8.x and backport?

Dries’s picture

Version: 8.x-dev » 7.x-dev

Committed to 8.x. Moving to 8.x. for webchick to consider.

Damien Tournoud’s picture

This is very weird. Why is this happening only to some people? None of our test bots have this issue, and I never seen AllowOverride All not sufficient to disable multiview. Maybe it only work silently when the multiview is not already on, ie. when the directive actually has no effect?

David_Rothstein’s picture

Version: 7.x-dev » 8.x-dev

It looks like this was actually committed to 7.x already, but not to 8.x:
http://drupalcode.org/project/drupal.git/commit/26d9d42

Dries’s picture

Status: Reviewed & tested by the community » Fixed

@DamZ: yeah, it's weird but apparently it fixes the problem, and keeps the tests bots happy.

@David: thanks for catching that -- I don't know how you do it ... :) Committed the patch to 8.x too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.