简体   繁体   中英

Where to locate my Drupal redirect

I have a drupal 7 site and it is redirecting to a page after login. I don't want it to redirect to that page but want it to redirect to another page.

Where can I look for what controls this? I am fairly certain this is going to be in the admin area of drupal but have not found it yet.

You can change the destination via rules/Actions.

  1. Create the destination node or view
  2. Go to 'Administration' » 'Configuration' » and under the heading 'System', click "Actions".
  3. 'Create an advanced action'
  4. Click the drop-down menu choice "Redirect to URL...".
  5. Click the button "Create".
  6. On the page 'Configure an advanced action', under the heading 'Label', you can leave the label as the default of "Redirect to URL".
  7. Under the heading 'URL', type the path of the destination.
  8. Click the button "Save".
  9. Go to the 'Modules' page and enable module 'Trigger', if it is not already enabled.
  10. Go to 'Administration' » 'Structure' » 'Triggers', and click the tab "User".
  11. Under the heading 'Trigger: After a user has logged in', click the downward pointing arrow. In the drop-down menu, click the name of the action you just created.
  12. Click the button "Assign".
  13. Logout, and log back in to test.

Read more at https://www.drupal.org/node/683696

You have 3 options here:

  1. Simply install the Login Destination module and set the path you want your user to be redirected to in the admin settings page of the module.

  2. Use the hook_user_login hook hook_user_login(&$edit, $account)

  3. Use the Rules to specify a rule for when an user logs in.

You can :

  1. login as admin user on the backend.
  2. Go to folliwng URL {your drupal site}/admin/config/system/site-information
  3. Find input box Default front page
  4. Input which page path you have, for example dashboard (PS: dashboard page should be able to access.)

You can use Rules module,

The Rules module allows site administrators to define conditionally executed actions based on occurring events.

  1. Create new Rule
  2. Add Event like 'User has logged in'
  3. If you run this Rule for any specific condition, then you can add condition like "User has role(s)" and provide user roles or leave as it is
  4. Add Actions like 'Page redirect' and provide the page URL
  5. Save and clear the cache

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM