Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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.

  • Like 1
Posted

@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 ?

Posted

@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 ?

Posted

Ok, i got it working by just moving the main installation to the root. Then te htaccess condition in my first post works.

Posted

@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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...