skip to Main Content

My website uses two pages to generate nearly all the content.

I have fixed the complaints Google had with browser URL rewrites and canonical references only to have it choke on redirect.

I use htaccess to convert the desired public-facing url (say www.mysite.com/ThisIsPage1) to the page that generates the actual viewable page (say www.mysite.com/genpage?word=ThisIsPage1).

I tried adding a 302 redirect in the htaccess file, but Google did not think much of that.
What is the right incantation to make Google index /ThisIsPage1 and not worry about how I handle the page rendering?

2

Answers


  1. If you want Google to index and show /ThisIsPage1 in its search results, it must directly return its content without a redirect.

    You should be able to map those nice URLs to the genpage URL in the .htaccess file, in a way that does not do an external redirect. e.g.

    RewriteEngine On
    RewriteRule ^/(.*)$ /genpage?word==$1 [L]
    
    Login or Signup to reply.
  2. to fix the issue remove the [R] flag from your .htaccess file to avoid a front-end redirect. instead, use [L] which ensures the URL rewrite happens behind the scenes without confusing google. this way, google will index /ThisISPage1 without worrying about how the page is generated.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search