views:

25

answers:

2

Ok, i used the below to "seoize" my urls. It works great..the only problem is when i go to the old page it doesnt redirect to the new page.. so i have a feeling i will get two pages indexed in google... how can i just permenantly redirect the old pages eto new urls...

RewriteRule ^city/([^/]+)/([^/]+) /rate-page.php?state=$1&city=$2 [NC]

http: / / www.ratemycommunity.com/city/Kansas/Independence

and old page = http://www.ratemycommunity.com/rate-page.php?state=Kansas&city=Independence

A: 

The problem is that the ugly url must be visible, as you need them for the rewrite. Just don't make any links to the ugly urls.

If search engines already know about the ugly urls, you can add another query parameter, say show=yes.

In the rewrite rule, ensure that you have the last parameter show=yes. If not, redirect to the nice url, which in turn will rewrite to the ugly url with the last parameter. Then, never link externally to the ugly url with the show=yes parameter.

Example:

/rate-page.php?state=Somestate&city=Somecity&show=yes

Accessing this page will show the content, but you must not make that link visible from anywhere.

/city/Somestate/Somecity

should be rewritten to /rate-page.php?state=Somestate&city=Somecity&show=yes, and

/rate-page.php?state=Somestate&city=Somecity

should be redirected to /city/Somestate/Somecity

Johan
yes, but those pages will still be indexed in google.... (as for the canonical urls, i already have that)
tyler
No, the pages with show=yes will not be indexed by google unless you link to them from anywhere. There is no way google can find out that they exist at all.Those without show=yes will do a 301 redirect to the nice url, and will therefore not be classified as duplicates.
Johan
A: 

The best thing to do is use cannonicalization, a recently introduced page tagging concept that tells Google and other crawlers what you want to be the URL of record. Check out this documentation and video by Google SEO guru Matt Cutts.

In your case, it will look like this:

<link rel="canonical" href="http://www.ratemycommunity.com/city/Kansas/Independence"/&gt;
editor
so theres no other way to redirect them to the new urls with a 301?
tyler
I encourage you to do both. On the old page, redirect via 301. On the new page, add the canonical tag.
editor
they are both the same page though.. just dif. urls...
tyler
It's best to have a single page w/lots of unique information rather than multiple pages with the same information.Throw a 301 on the old URL, and the same canonical tags on both.
editor