![]() |
|
configure .htaccess for multisite installation - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: configure .htaccess for multisite installation (/thread-11417.html) Pages:
1
2
|
configure .htaccess for multisite installation - flu - 16-10-2013 Hi guys (yeah, I know you missed me...). The main installation runs fine on site1.com but I don't understand how to configure .htaccess for the cloned gallery in order to use site2.com for it (I hope it's clear). configure .htaccess for multisite installation - acrylian - 16-10-2013 Actually you don't need to configure anything. Both installs have their own htaccess file and the clone only shares the same base folders via symlinks. configure .htaccess for multisite installation - flu - 16-10-2013 Hi Acrylian, configure .htaccess for multisite installation - acrylian - 16-10-2013 For better overview on the webspace I would recommend this: If you have more than one domain each site you need to make one to the main domain ("Duplicated content" avoiding). You then could do that via a htcacess in the root, too. configure .htaccess for multisite installation - flu - 16-10-2013 In fact the folders are already set and used like that and I can't change it (for production cause). configure .htaccess for multisite installation - acrylian - 16-10-2013 Well, if you don't want to change it (you really could if you like), you have to redirect the url the same way either using your host's backend or a htaccess redirection. For htaccess redirections there are loads of tutorials on the net. configure .htaccess for multisite installation - flu - 16-10-2013 Acrylian, could you tell me what do I have to change in my .htaccess (on site1.com or site2.com) to make it work ? configure .htaccess for multisite installation - acrylian - 16-10-2013 See: configure .htaccess for multisite installation - flu - 16-10-2013 Well, nothing specific to Zenphoto clone option. configure .htaccess for multisite installation - acrylian - 16-10-2013 No, indeed, just general web stuff ;-) The only part for Zenphoto is that if you redirect a domain to /site2 the ZP htaccess of that has of course needs to be configure .htaccess for multisite installation - flu - 17-10-2013 The installation is like that : The .htaccess are already rewrited base : site1.com .htaccess : IndexIgnore * RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^site2.com$ [OR] IndexIgnore * RewriteEngine On RewriteRule ^.*/?$ index.php [L,QSA] ` configure .htaccess for multisite installation - acrylian - 17-10-2013 Again it would be all easier if you would redirect the domain via your host directly to the /site2 folder. Also your domain redirection should go before the other rewrite ones. Also one rewriteCond per one RewriteRule. Try this: configure .htaccess for multisite installation - flu - 17-10-2013 Hi, I've made the change but site2 is still redirected to site1. Here are the .htaccess : Site1.com : RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteRule ^.*/?$ index.php [L,QSA]
RewriteEngine On RewriteCond %{HTTP_HOST} ^site2.com$ [NC] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteRule ^.*/?$ index.php [L,QSA] ` configure .htaccess for multisite installation - acrylian - 17-10-2013 So you already redirected the site2.com domain to the /site2 folder? Then you don't need to do the same using htaccess… And if you are already on the site there is nothing to redirect via that sites htaccess because that itself now redirects back to site1.com/site2 again… You are really over complicating things here… configure .htaccess for multisite installation - flu - 17-10-2013 "You are really over complicating things here… " configure .htaccess for multisite installation - flu - 17-10-2013 Then, site2.com is still redirected to site1.com. .htaccess site1 :
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteRule ^.*/?$ index.php [L,QSA]
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteRule ^.*/?$ index.php [L,QSA] ` configure .htaccess for multisite installation - acrylian - 17-10-2013 Clear your browser cache and make sure the web server setting via your host are correct. Sometimes these take some time to work. configure .htaccess for multisite installation - sbillard - 17-10-2013 I think you really need to study rewrite rules. I am at a loss as to why you do point your domains directly to the correct folder and let everything work normally. If you actually succeed the way you are going you will have created for yourself a maintenance nightmare. configure .htaccess for multisite installation - flu - 18-10-2013 Ok Stephen. configure .htaccess for multisite installation - acrylian - 18-10-2013 Again, you are really overcomplicating things. As long as you have both sites under separate domains there is no change to any of the sites. Production or not. Really, again my suggestion to put both in their own folders in the root of your webspace and redirect the domains via your webhost's interface to those folders. Then run setup on each or change the rewritebase htaccess entry to If the 2nd is a clone you might needto re-clone the files but as long as you use the same database credentials on that clone (save the config file) and same albums also nothing will be harmed. It is really that simple. |