Jump to content

Recommended Posts

Posted

Hi all,

 

I'm just looking for some advice really.

We've got a current website in the root of our hosting account and have been developing a new Processwire powered one in a sub-directory.

We're now getting close to setting the new site live and I'm wondering which is best; leave the new site in the sub-directory and modify the .htaccess file to point to it, or remove the existing site and move the new one across to the root.

We're also looking to install Piwik in its own folder too, together with the Piwik Analytics module. Would this work if the site remains in the sub-directory, because Piwik would effectively be in a sub-directory off a sub-directory?

Basically it comes down to which is the more satisfactory option, leave it where it is versus move it to the root.

If it stays in the sub-directory, I'll want to change the .htaccess file to point at that location, but also hide the sub-directory so it looks as if it's running from the root, e.g. the site is running from www.example.com/cms/ but the visitor never sees the /cms/ in the urls.

Thanks in advance for any advice.

Tony.

Posted
5 minutes ago, Tony Carnell said:

remove the existing site and move the new one across to the root

yes

5 minutes ago, Tony Carnell said:

We're also looking to install Piwik

i would do piwik in a subdomain

  • Like 2
Posted

Thanks for your reply Macrura.

I'm interested when you say you'd do piwik in a subdomain. You mean something like www.stats.example.com? What advantage does that provide?

Tony.

Posted
6 hours ago, Tony Carnell said:

What advantage does that provide?

For me, it follows a principal called 'separation of concerns'. Running analytics has nothing to do with the actual running of your site, and so it should be kept separate, on another domain (or subdomain, which is technically another domain).

So my recommendation is the same - move PW site to the public root and move analytics to a subdomain public root.

  • Like 3
Posted

Thanks for the help guys, and sorry for my late reply.

I like the 'separation of concerns' you mention Mike Rockett and I think I'll implement this.

Thanks again.

Tony.

  • Like 1

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
×
×
  • Create New...