1

How can I change the path part of the node URL from ?q=node/2 into something more meaningsful. I want, for instance, to display it like this: ?q=Services.

3
  • What do you mean by "my favorite node name" and "I want it to display like Services"? Please edit your question.
    – apaderno
    Aug 15, 2013 at 9:40
  • Why are you using ?q= at all? Why don't you simply turn on friendly addresses? It usually works out of the box. Then, go look for pathauto manuals.
    – Mołot
    Aug 21, 2013 at 6:36
  • @Mołot, whether clean URLs work out of box or not depends on the Apache config. Some shared hosting plans don't let users enable mod_rewrite. Aug 21, 2013 at 11:14

2 Answers 2

0

What you need is the pathauto module

The Pathauto module automatically generates URL/path aliases for various kinds of content (nodes, taxonomy terms, users) without requiring the user to manually specify the path alias. This allows you to have URL aliases like /category/my-node-title instead of /node/123. The aliases are based upon a "pattern" system that uses tokens which the administrator can change.

And you may also want to enable clean url to get rid of the q= in the url

To change a particular node, go to admin/config/search/path/add enter image description here

Or go to the node and scroll down to url path settings and change it there. Make sure to uncheck generate automatic URL alias

enter image description here

2
  • This worked and I Preciate but how to change the existing ones because it can only change the new ones created after installation I will be so glad to get an answer
    – user20077
    Aug 15, 2013 at 8:41
  • See updated answer
    – 4life
    Aug 15, 2013 at 8:54
2

Assuming you're using Drupal 7, to manually set a name for a module, all you need to do is to login as admin and navigate to Configuration → URL aliases. There you can create string aliases for nodes, so that node/2 is aliased to Services.

For the nicest URLs, you should also enable Clean URLs on you site.

If you do not want to do this yourself, but instead want want names to be assigned to node paths automatically (based on some set of rules), then you can install and enable the PathAuto module.

0

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