How do I add a custom mod_rewrite rule to a Drupal site on module install?

Posted by DKinzer on Stack Overflow See other posts from Stack Overflow or by DKinzer
Published on 2010-05-06T16:02:41Z Indexed on 2010/05/06 16:08 UTC
Read the original article Hit count: 189

Filed under:
|

I have a Drupal-6 module that needs the following mod-rewrite rule added to the .htaccess file of the site's root directory in order to work.

RewriteRule ^blog/([0-9]{4}/[0-9]{2}/[0-9]{2}/.*)$ wordpress/$1

How can I add this line pro-grammatically when the module is first installed? Can I use custom_url_rewrite_inbound(&$result, $path, $path_language) to do this? If so, could you please show me an example?

Thanks,

D

© Stack Overflow or respective owner

Related posts about drupal

Related posts about mod-rewrite