I have setup 2 aliases for each node of a content type called "property". The first alias is like example.com/texas/village-apartments and the second is example.com/texas/corp/village-apartments.

When you go to the second URL (the one with "corp") you see different pieces of information on the page, different buttons, menus and other items that do not really belong on a non-corp page.

Pathauto handles creating the first alias (without "corp"), then I manually created the corp aliases by going to admin/config/search/path/add and added each one.

This all works fine except for when I go to edit the node and add text or a picture or whatever. When I click save, I am redirected to the URL with corp and of course see different menus, blocks, etc.

Is there any way to configure things so that I am redirected back to the same URL path I was on when I clicked 'edit'?



There's no easy way. You might have to make your own module with code something like this:

function mymodule_node_presave(){
function mymodule_drupal_goto_alter(&$path){
  if ($GLOBAL['dont_redirect']==true){
    $path = "";

Would this module work for your needs?


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.