简体   繁体   English

在哪里可以找到我的Drupal重定向

[英]Where to locate my Drupal redirect

I have a drupal 7 site and it is redirecting to a page after login. 我有一个drupal 7网站,登录后将重定向到页面。 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. 我相当确定这将在drupal的管理区域中,但尚未找到它。

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...". 单击下拉菜单选项“重定向到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". 在“配置高级操作”页面上的“标签”标题下,您可以将标签保留为默认设置“重定向到URL”。
  7. Under the heading 'URL', type the path of the destination. 在“ URL”标题下,键入目标的路径。
  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 https://www.drupal.org/node/683696上阅读更多内容

You have 3 options here: 您在这里有3个选择:

  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) 使用hook_user_login挂钩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 转到网址{您的Drupal网站} / admin / config / system / site-information
  3. Find input box Default front page 查找输入框Default front page
  4. Input which page path you have, for example dashboard (PS: dashboard page should be able to access.) 输入您拥有的页面路径,例如仪表板(PS:仪表板页面应该能够访问。)

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 保存并清除缓存

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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