0

I was looking at admin/config/search/ for adding url aliases. I wanted to add alias to the website/root so user can see same content to mysite.com/somecityname to same mysite.com/.

It seems like we can give alias to nodes only because the "Existing System Path". Is it possible at all? I guess there is a way to do this by defining it in .htaccess which is out of scope of Drupal, so I was wondering is there any way to achieve this?

I tried to give an alias to which is home page but it still shows 404

  • This question is quite similar to your previous one and I believe my answer is applicable to both: drupal.stackexchange.com/questions/105092/… – Wtower Feb 28 '14 at 10:14
  • one answer for two different questions :) – Dudepal Feb 28 '14 at 10:19
  • that question was about managing url aliases. may be little related but it go no solution yet – Dudepal Feb 28 '14 at 11:33
1

While you can't alias something to an empty path, you can alias something to node (i.e. mysite.com/node, which will be your website root in a Drupal system set up by default).

If you're set your website root to be some other path than node, you should be able to use that path instead. Navigate to Home » Administration » Configuration » System, and notice what is in indicated in the text field "Default front page". If this field is not empty, you must use that as your path instead of node.

(The above solution uses the standard path alias function that is part of Drupal core - it doesn't require any external modules.)

  • Thanks for answering, I think I am getting close. After giving mysite.com/mycity to mysite.com/node its not showing the home page content but some random content. How to correct this? – Dudepal Feb 28 '14 at 11:44
  • you are great. I have more questions :) but I will try out first – Dudepal Feb 28 '14 at 12:07

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.