New Mediaist Internet Marketing

  • home
  • about the author
  • contact
  • glossary
Home › Blogs › Ari's blog

Menu

Blog Topics

  • Advertising
  • Analytics
  • Authority
  • Blog Topics
  • Blogroll
  • buzz
  • Canada
  • email
  • Entrepreneurship
  • Ethics
  • Film
  • Gaming
  • General
  • Law
  • Mobile
  • Open Source
  • P2P
  • PPC
  • RFID
  • SEO
  • Social
  • Social Media
  • Strategy
  • Technology
  • Theory
  • TV
  • Uncategorized
  • Usability
  • Videos
  • Web2

User login

  • Create new account
  • Request new password

Navigation

  • Recent posts

How to redirect /index.php to / using mod_rewrite and .htaccess

Submitted by Ari on Wed, 08/01/2007 - 11:53.

Nice short post today, with one quick SEO tip that can (sometimes) gain you big pagerank quickly.

As previously mentioned, the search engines see http://www.newmediaist.com and http://www.newmediaist.com/index.php as two different pages (although they may lead to the same content). This means that although they are actually the exact same content, from the search engine's perspective both / and /index.php have their own ranking criteria (also known as "link juice" - backlinks, pagerank, etc...)

Now we don't want to split up "link juice" between two pages, so we need to either 301 redirect all requests for /index.php to /, or visa versa. This can be done by a fairly simple addition to the .htaccess file.

#Forward index.php to /
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.newmediaist.com/$1 [R=301,L]

(Reminder: Change www.newmediaist.com to your domain name!)

  • SEO
  • Ari's blog
  • Add new comment
  • home
  • about the author
  • contact
  • glossary

Bottom Nav Menu

  • Privacy Policy
  • Site map