ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Analytics question...

January 20, 2012 5:31am

Subscribe [2]
  • #1 / Jan 20, 2012 5:31am

    oltremedia

    28 posts

    Hi guys!

    In Google analitycs i have separate traffic values for:

    / and
    /index.php

    do you think it would be good to make a redirect to “pack” those results?

    Would it be better to redirect to “/” or “/index.php” ?

    Thankyou!
    Francesco

  • #2 / Jan 24, 2012 4:56am

    Osze

    42 posts

    Yeah, for SEO never split any URL.

    If you don’t do anything with your standard EE installation you’ll split your Google Power between:

    http://www.yourdomain.com
    http://www.yourdomain.com/
    http://www.yourdomain.com/index.php
    http://www.yourdomain.com/index.php/
    yourdomain.com
    yourdomain.com/
    yourdomain.com/index.php
    yourdomain.com/index.php/

    The best is to do some changes in your htaccess-file:

    RewriteEngine On
    
    # add slash to every URL
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !example.php
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ <a href="http://yourdomain.com/$1/">http://yourdomain.com/$1/</a> [L,R=301]
    
    #Redirect from www to non-www
    RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com [NC]
    RewriteRule (.*) <a href="http://yourdomain.com/$1">http://yourdomain.com/$1</a> [R=301,L]
    
    
    #Removes index.php from the URL
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    Change “yourdomain” to your domain in the code. 😊

  • #3 / Jan 27, 2012 7:28am

    oltremedia

    28 posts

    Ozse Thankyou very much!!!

    Just a question i don’t need to remove index.php from the url (I am scared about it ... 😉 ) what about a 301 redirect from “/” to “/index.php” ?

    Thanks!
    Francesco

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases