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. Quote 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). Quote 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. Quote 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. Quote 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? Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.