Where conditional rewrite is desired, not supported by existing path modules, and where we'd prefer to stay out of .htaccess, where might we hook in Drupal 6?
Along the lines of Drupal 7 hook_URL_inbound_alter
, I think.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityWhere conditional rewrite is desired, not supported by existing path modules, and where we'd prefer to stay out of .htaccess, where might we hook in Drupal 6?
Along the lines of Drupal 7 hook_URL_inbound_alter
, I think.
hook_URL_inbound_alter
was introduced as part of a contributed module in Drupal 6 (URL alter), and was moved to core with Drupal 7.
In Drupal 6, the equivalent of hook_url_inbound_alter() is custom_url_rewrite_inbound() which is not a hook, but a function to put in the settings.php file used by Drupal.
The URL alter module defines that function, and call any implementation of hook_url_inbound_alter()
defined from other modules, allowing modules to use the same code for Drupal 6, and Drupal 7.
The same is true for custom_url_rewrite_outbound(), and hook_url_outbound_alter().