Help needed on Google Analytics and Webmaster Tools

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

Help needed on Google Analytics and Webmaster Tools

Post by Martin_K »

Our site had two directories: /twx/ (wiki) and /discuss/ (forum).

I changed the forum directory to /forum, so we now have /twx/ and /forum/. I have also installed Magic SEO URLs for phpBB3 3.0 for URL rewriting.

1) I know I need a .htaccess to do a 301 redirect from /discuss/ to /forum/ for the bots, but am not sure of the exact code for this. Currently I have

Code: Select all

 RedirectMatch 301 ^/discuss/ http://opgo.co.uk/forum/
, but this only redirects to forum/index.php so needs changing. I guess this needs wildcards.

2) Not sure of any other way of letting the Bots know that the forum directory name has changed.

3) On Google Analytics I guess I need the same tracking code one every page I need analysing, then can analyse the site as a whole, and I can apply filters to analyse to traffic to the separate directories. There is a subdomain switch, but as I am using directories, not domains, no need to switch this on?

Help needed on Google Analytics and Webmaster Tools

Post by Martin_K »

On point 1) I have Googled and found a better way

Code: Select all

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ http://opgo.co.uk/forum/$1 [R=301,L]
This seems to redirect all old urls to the new one.