I have searched high and low for the answer to this problem, and all I was able to come up with was http://drupal.org/node/281185 and http://drupal.org/node/281195, neither of which help me figure out what is going on.

Basically, the "My Account" link for any user returns a "404-page not found" error from the webserver (not even a Drupal one). I look at the URL_Alias table, and all is good there: each user has an alias with "users/[user-raw]" pointing to "user/[uid]". This seems like it would work fine, but when I look at the web server's error log, I see that the website is returning the 404 on "File does not exist: /var/www/web8/user/jdtart, referer: http://www.mysite.com/admin/build/path/pathauto". Well clearly that's not a valid path! Why is it dropping off the Drupal path?

Has anyone else seen this problem AND resolved it?? This is a pretty basic new installation; I haven't added many modules that could be conflicting.

Comments

jdtart’s picture

Status: Active » Fixed

OK, for anyone else who may be having this problem, this worked for my case:

I contacted the webhost and found out that there was a line in the Apache config like so:

AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web8/user/$1/web/$3

So basically, my URL_alias that was set to /users/[user-raw] was matching that regexp and being tossed off the Drupal path.

I cannot say what the webhost did to fix it, whether commenting out the line or changing it, but my problem is solved.

greggles’s picture

Oh, wow. I've seen bug reports about this issue before but never a solution.

Thanks for your investigation!

Status: Fixed » Closed (fixed)

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

alexfisher’s picture

I had the same issue. I was on a server using ISPConfig which was telling apache to rewrite URLs using /users/

I commented-out the line:

AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3

in the file:

/etc/apache2/vhosts/Vhosts_ispconfig.conf

This file is part of the apache configuration and is included at the end of

/etc/apache2/apache2.conf

IMPORTANT: Restart apache (e.g. apache2ctl restart) after saving the file. You may need your ISP to do this for you if you don't have root access to your server.

alexfisher’s picture

Sorry, looks like that just temporarily fixed the issue. ISPConfig rewrote the file. There's a more correct way to do this for HTTP vhosts by editing the file in:

/root/ispconfig/isp/conf/customized_templates/vhost.conf.master

There is more information at:

http://adamyoung.net/ISPConfig-Remove-User-Directories

Note: for HTTPS vhosts you must edit:

/root/ispconfig/scripts/lib/config.lib.php

hallio’s picture

Thanks... I solved the problem by changing pathauto/aliases setting so that it uses user/ instead on users/...
I had to manually change them for current users, but hopefully in future for newly created user the automated alias setting will create it correctly.

Cheers!!

mennonot’s picture

Thanks, this was a very helpful insight. I didn't even realize that pathauto had started to rename the "my account" page url. Seems like a risky default for pathauto if it clashes with some ISP's default setting.