摘要:
开启了url_alter后,将实现两个HOOK,hook_url_inbound_alter与hook_url_outbound_alter,作用是重写URL,第三方URL重写模块都需要实现它。以下是实现例子:/* * 伪地址转原地址 (url_alter) */function example_url_inbound_alter(&$path, $original_path, $path_language){ if (preg_match('|^article(/.*)|', $path, $matches)) { $path = 'node'. $m 阅读全文