sirhc Posted April 15, 2021 Share Posted April 15, 2021 Hi there, I have this problem where i have two subdirectories in my webroot, with two installs of processwire. /main/ is serving the main site and lives on www.example.com /blog/ is a fresh install and needs to be in control over whatever happens on www.example.com/blog/ I tried this rule in my htaccess file in the /main/ folder RewriteCond %{REQUEST_URI} !^/blog/ But i get the regular 404 page of the main installation. I hope someone can help me with this, to redirect te /blog/ page to the blog processwire installation. Link to comment Share on other sites More sharing options...
bernhard Posted April 15, 2021 Share Posted April 15, 2021 If using subdomains is an option I think it would be easier to serve the blog from blog.example.com 1 Link to comment Share on other sites More sharing options...
virtualgadjo Posted April 15, 2021 Share Posted April 15, 2021 Hi, honestly, i wonder if your not over complicating your life here ? if your website is going to be example.com with a blog which url will be example.com/blog why don't simply have one install in the main directory and set a page name... blog the only reason i can imagine is that the blog editor may not have the same admin rights as the "main" site ones, well, it would be far simpler to do this with user profiles... one more reason for this will be all the work you're going to have when dealing with possible common content between the web site and the blog, i.e. three last post on the home page, in one install, it's just fingers ine the nose, with two, you'll have to deal with the connexion to another db, and so on hope it helps have a nice day Link to comment Share on other sites More sharing options...
sirhc Posted April 15, 2021 Author Share Posted April 15, 2021 Yes, that is easier haha, i have this currently setup. But i want to have the SEO benefits of having it on the same domain. 1 Link to comment Share on other sites More sharing options...
virtualgadjo Posted April 15, 2021 Share Posted April 15, 2021 bernhard was faster than me ? and he is right too ? Link to comment Share on other sites More sharing options...
sirhc Posted April 15, 2021 Author Share Posted April 15, 2021 Thanks for your answer @virtualgadjo. The reason for this is that in the near future the main website is getting another cms, but the blog wont be migrated Link to comment Share on other sites More sharing options...
virtualgadjo Posted April 15, 2021 Share Posted April 15, 2021 @sirhc i can't find a fainting emoticon ? but, nevermind, i'll say it anyway, except if the main website is going to be a huge magento e-commerce website, why an other cms ? is there anything it will have to do that pw can't do ? Link to comment Share on other sites More sharing options...
sirhc Posted April 15, 2021 Author Share Posted April 15, 2021 @virtualgadjo the main website will be a React application, without an actual CMS, and will be managed by other people than the blog. Link to comment Share on other sites More sharing options...
virtualgadjo Posted April 15, 2021 Share Posted April 15, 2021 @sirhc ah ok i understand... you know that, in this case, you'll loose a lot of the SEO work you were speaking about if i had a customer asking for the same kind of thing i would have tried to convince him/her/them to do the opposite, the website and the blog in a pw install and, when ready, a link to the app from pw menu, this way they could have worked without breaking anything, SEO included but i know clients are not always that easy to convince... cheer up ? Link to comment Share on other sites More sharing options...
sirhc Posted April 15, 2021 Author Share Posted April 15, 2021 Thanks for all your advice! But I do hope that someone is able to help me with my initial question ? Link to comment Share on other sites More sharing options...
sirhc Posted April 15, 2021 Author Share Posted April 15, 2021 Ok, i got it working by just moving the main installation to the root. Then te htaccess condition in my first post works. Link to comment Share on other sites More sharing options...
virtualgadjo Posted April 15, 2021 Share Posted April 15, 2021 @sirhc good even if funny solution ? you'll just have to set the blog config file httpHosts to www.thesite.com/blog if not already done and be careful with your base href for the blog part as the simple / won't work for its own install assets ? have a nice day Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now