Consolidating pages using htaccess

Discussion in 'Search Engine Optimization' started by iw-Michael, Mar 2, 2011.

  1. #1
    I'm running Network 13 news on a Website. I'm calling the news script on external pages (As described in the Developers Wiki). I'm faced with a little problem causing duplicate urls. I'm worried this will cloud Search Engine cache and possible cause problems with duplicate content.

    I noticed a four url variations that produce the same webpage:
    domain.info/?id=xxx
    www.domain.info/?id=xx
    domain.info/index.php?id=xxx
    www.domain.info/index.php?id=xx

    I decided to resolve this issue with a 301 redirect. First, I thought it might be good to force the www. before all requests. Second, force index.php to trail.
    I did a little research and came up with this on the htaccess:

    RewriteCond %{HTTP_HOST} !^www.informative-works.info$ [NC]
    RewriteRule ^(.*)$ http://www.informative-works.info/$1 [L,R=301]
    RewriteCond %{HTTP_HOST} ^www.informative-works.info$
    RewriteRule ^$ http://www.informative-works.info/index.php [L,R=301]

    Is this a bad move (301) or will this method be favorable with Search Engines? In addition, I am curious if someone experienced with rewrite has a better solution.
     
    iw-Michael, Mar 2, 2011 IP