I do not want to display a login block or link on every page. I would instead like to create a single login page accessible from http://example.com/login. How can I do that?


/user/login exists by default; you could use that.

|improve this answer|||||
  • 2
    And if it must be at yoursite.com/login, you can create a path alias. – Berdir May 6 '11 at 12:31
  • @Berdir i think that is what i want. how can i do that? making without ? and = just write the user name or something else – jone May 6 '11 at 13:00
  • Not sure what you mean exactly. Is your URL currently something like `?q=some/path'? Then you have to enable Clean URL's. Or do you want to pass the username of the user that should be logged in to that page? Anyway, you can create an alias by enabling the Path module (if it isn't already) and then go to admin/config/search/path. – Berdir May 6 '11 at 13:57
  • @Berdir yes my URL is like ?q=some/path and i'm using drupal 7 there is no admin/config/search/path my admin controller. if it is possible to change this URL ?q=some/path to something else, that will be cool. and that is what i want. thanks, – jone May 6 '11 at 14:12
  • These are two completely different things. If you have URL's like that, this means that you don't have clean URL's enabled. See drupal.org/getting-started/clean-urls for more information. After you enable them, the URL I gave you should work. But in general yes, url aliases allow you do define arbitrary URL's which can point to any internal url (user/login in this case). – Berdir May 6 '11 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.