I have submitted my site with ugly URLs to Google, and now they are appearing as mysite.com/show.php?id=42
.
Now, I know that I can 301-redirect it to mysite.com/article/42
. However, my site uses the URL form like stack exchange, so like this mysite.com/article/42/title-of-my-article
which is in fact index.php?what=content&id=42&title=title-of-my-article
.
Therefore, I cannot use only .htaccess for this, right?
So will it work if I do this?
- Keep
show.php
as the redirect node - if user comes to
show.php?id=42
, get the article of title withid=42
, andecho "<meta http-equiv='refresh' content='0; url=http://mysite.com/article/42/$title'>
It will work for the visitors, but will it help Google to understand and change the URL to the new one?