This is weird.
When users access /user a Page not found error shows up.

but users access /user/login or /user/register, the forms show up.

Comments

kgp22’s picture

This is more of a conflict with url aliases. trying to mask /user with another name would not work.

gpk’s picture

Status: Active » Postponed (maintainer needs more info)

Don't understand what you were trying to do .. I can make /user point somewhere else using URL aliases, or make another URL point to /user..

gaele’s picture

I guess with "users" you mean visitors, who are not logged in?

gpk’s picture

Note: for anonymous visitors who are not logged in, /user actually takes you to the /user/login screen (this being the default local task). If you are logged in then Drupal does a drupal_goto('user/'. $user->uid); when you hit /user.

kgp22’s picture

ok url aliasing works now with /user

gpk’s picture

OK I'm not quite clear if everything is now behaving as you want? If it is then we can set this to fixed.

If you want everyone's My account to have a link say myaccount instead of user/xx then I think there's a little module that will do that.

ultrajet’s picture

I'm experiencing the same problem, even worst user/login and user/register doesn't work. It varies from different server environment. My ubuntu is experiencing the same problem.

I think it has something to do with .htaccess, but I'm not sure.

gpk’s picture

@7: What version of Drupal are you using?

ultrajet’s picture

drupal 6, using unclean url, I wasn't able to login to verio site using ?q=user/

gpk’s picture

Which version of Drupal 6?

Try also ?q=user/login.

If that doesn't work then possibly the menu router needs to be rebuilt (maybe a previous attempt to do so failed for some reason e.g. a timeout, but usually in that case it would be attempted again). If you look in the {menu_router} table in the database there should be an entry for the path user/login. Can you see it? If not then you could force a menu rebuild by creating a new entry in the {variables} table for the variable "menu_rebuild_needed" and set it to 1. Then empty (truncate) the {cache} table. Always backup your DB first before messing around in there..!

HTH,

ultrajet’s picture

Sorry, I checked again, the login works fine, but when you click the administer or ?q=admin after you login, it gives you a 404 error.

gpk’s picture

@11: comments at #10 still apply..

ultrajet’s picture

Thanks, I'll try it

ultrajet’s picture

I saw the path user/login what do I do instead of the option at #10 which is emptying the table

and if ever I used the one mention above, on what field do I put the "1"?

Thanks again

gpk’s picture

Ah, what I meant was, if you are having problems with the path "admin" then can you see an entry for "admin" in {menu_router}?

ultrajet’s picture

I see it, what do I do now?

gluetown’s picture

I'm late to the party I see, but I experienced this issue also with a dev site in drupal 6. /user (and really any address off of the root) would not load without the ?q= preceding it.

Turned out the .htaccess file was missing. Copied a backed up htaccess file to the root and it works fine after that. Just an FYI for anyone else who might run into it.

cafescott’s picture

hi,

i'm having the same problem with a Drupal 5 site that i'm in the middle of (hopefully) upgrading to Drupal 6. when i attempt to go to /?q=user or /?q=user/login, i get a 404 error.

however, i haven't had an htaccess file before. it isn't in any of my backups. i also don't think i need it; i don't need folder-specific settings.

does anyone have an idea what I can try instead? thanks.

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Considering the lack of activity on this issue and that Drupal v5 is no longer supported by for fixes or patches, I am going to close this ticket.

sarathyvv’s picture

Thank you gluetown,
I too had my .htaccess file missing on my site. Since i did not have any backup of it i tried uploading .htaccess from one of my client's site it just worked. That too in drupal 7.16.

swapnilmohile’s picture

Issue summary: View changes

In Apache 2.4 you have to mark AllowOverride All to gain access of .htaccess
it may appear as
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All

cavalcami’s picture

Hi guy, sorry for my english but i have solved the problem
and i wrote some step for resolve the problem.

================================================== ===
     NOTE: Error 404 issues.
================================================== ===
WHEN I TRANSFER MY DRUPAL SITE FROM INTERNET
TO LOCAL LAMP AND IF NOT 'BEEN DISABLED "ALIAS_URL"
BEFORE THE TRANSFER MUST DO IT BY HAND
TO AVOID REPEATED ERRORS 404 IN FUTURE.
-------------------------------------------------- ---
PROCEDURE: TO ENTER THE MENU SHOULD ADD
BEHIND THE URL TEXT : "?q=user" FOR USER OF THE SITE
OR "?q=admin" FOR THE ADMIN PAGE.
-------------------------------------------------- ---
EXAMPLE:
MY DRUPAL SITE IS http://www.cavalcami.it AND WHEN
I'M LOGGED I SEE IN URL SOMETIME AS :
http://www.cavalcami.it/admin/config/development/performance
OR
http://www.cavalcami.it/user/
-------------------------------------------------- ---

NOW WHEN SITE IS ON MY LAMP SERVER, IN LOCALHOST,
I MUST DO THIS STEP TO AVOID ERROR 404.
=============================================

STEP 1: authenticate ->?q=user
STEP 2: TEST WAS AUTHENTICATION ->?q=admin
STEP 3: TURN OFF THE ALIAS_URL ->?q=admin/config/search/clean-urls
-------------------------------------------------- -----------------------
IMMEDIATELY AFTER SECURITY ERASE ALL THE CACHE:
?q=admin/config/development/performance
-------------------------------------------------- -----------------------

in other words I have to replace the word admin and user in the url
respectively with ?q=admin and ?q=user

I hope I was helpful

cavalcami’s picture

just to complete the story, my .htaccess file has not changed
except a comment to a row:

the .htaccess file when Drupal was on the internet
**************************************************************
...................
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# uncomment the following:
# RewriteCond %{HTTP_HOST} .
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /

the .htaccess file when drupal is back on my computer localhost lamp
************************************************************************
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# uncomment the following:
# RewriteCond %{HTTP_HOST} .
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment the following:
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /

(((of course we talk about the .htaccess file located in the root of the drupal site.)))

bye beautiful

drupal.webb’s picture

Dear Mr. cavalcami,

You saved me so much time in troubleshooting a new issue after switching from a Windows to a Linux environment on the shared server at my hosting provider. I've documented your comments, so I can sleep soundly tonight.

Thank you!