wardy277 Posted September 22, 2008 Share Posted September 22, 2008 Hi, I am pretty new to configuring the apache config files. I have heard that there is a hddp.conf file that can be used as a redirect. What i want is lots of sites to use the same files instead of copying them over each time i make a change. How do i make is so that if the file does not exist then it will lookup the file in another directory. e.g /var/www/vhosts/testsite1/foo.html /var/www/vhosts/testsite2/foo.html /var/www/vhosts/testsite3/foo.html /var/www/vhosts/testsite4/foo.html /var/www/vhosts/main_site/foo.html none of the testsites have foo.html but main_site does. how do i make a rule so for all sites, if a file accessed does not exist then look it up in /var/www/vhosts/main_site/directory I know this can be done but don't know how Chris Quote Link to comment https://forums.phpfreaks.com/topic/125365-apache-httpdconf-if-not-exists-use-different-directory-rule/ Share on other sites More sharing options...
wardy277 Posted September 23, 2008 Author Share Posted September 23, 2008 Anyone?? at least point me in the direction on how the config works? Quote Link to comment https://forums.phpfreaks.com/topic/125365-apache-httpdconf-if-not-exists-use-different-directory-rule/#findComment-648780 Share on other sites More sharing options...
corbin Posted September 23, 2008 Share Posted September 23, 2008 You could probably do it with mod_rewrite. Look into RewriteCond and RewriteRule. Quote Link to comment https://forums.phpfreaks.com/topic/125365-apache-httpdconf-if-not-exists-use-different-directory-rule/#findComment-649054 Share on other sites More sharing options...
wardy277 Posted September 24, 2008 Author Share Posted September 24, 2008 No i have looked into that but that only allows the page to be in the same site, i want it to use another site on the same server Quote Link to comment https://forums.phpfreaks.com/topic/125365-apache-httpdconf-if-not-exists-use-different-directory-rule/#findComment-649766 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.