fooDigi Posted August 27, 2008 Share Posted August 27, 2008 How can i have a set of mod_rewrite rules shared by all virtual hosts? Currently, i have added these same rules for each virtual host entry, so the same rules are repeated many times and are a pain to manage. I want to be able to add or make changes in only one spot, and have it effect all virtual hosts. Thanks for any help. Link to comment https://forums.phpfreaks.com/topic/121603-rules-shared-by-virtual-hosts/ Share on other sites More sharing options...
trq Posted August 27, 2008 Share Posted August 27, 2008 Just place your rules with the global configuration file (usually httpd.conf). Link to comment https://forums.phpfreaks.com/topic/121603-rules-shared-by-virtual-hosts/#findComment-627330 Share on other sites More sharing options...
fooDigi Posted August 28, 2008 Author Share Posted August 28, 2008 that is where i have them currently. i have multiple <VirtualHost> directive's within my httpd.conf, each with the same mod_rewrite rules. i would like to set the mod_rewrite rules outside of the <VirtualHost> directive "somehow" and still effect all virtual hosts. Link to comment https://forums.phpfreaks.com/topic/121603-rules-shared-by-virtual-hosts/#findComment-627406 Share on other sites More sharing options...
trq Posted August 28, 2008 Share Posted August 28, 2008 i would like to set the mod_rewrite rules outside of the <VirtualHost> directive "somehow" Then move them into the main section of the file. Link to comment https://forums.phpfreaks.com/topic/121603-rules-shared-by-virtual-hosts/#findComment-627418 Share on other sites More sharing options...
fooDigi Posted August 28, 2008 Author Share Posted August 28, 2008 i figured that would work, but it does not. does it matter where is placed and what type of rules are specified? Link to comment https://forums.phpfreaks.com/topic/121603-rules-shared-by-virtual-hosts/#findComment-627427 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.