By now I am fighting through the world of SEO and run into a problem, I think.
Let's say I have a page like www.example.com/i-am-a-pretty-url, which is re-written by .htaccess
from i-am-ugly-url.php
to the above version.
If I now want google to NOT index the pretty url, will it take an effect, if I add <meta name="robots" content="noindex" />
to the i-am-ugly-url.php
file?
I think it should, because there is no other way to prevent the indexing of a re-written URL, right?
However I tried this method on some "not-to-index" URLs of mine to remove them from Google index and redirected them to a remove.php, which has the meta-tag no-index in it. I fetched the URLs as Google to crawl these pages quickly multiple times, but there was no effect for days.
If the crawler not consider the meta tag, then every rewritten URL will be indexed, if the crawler finds the page anywhere. If it does and I remove the no-index-tag from the resource file, both URLs - the pretty URL and the file (*.php) will be indexed, if mentioned anywhere.
So how I solve this dilemma?
UPDATE:
.htaccess sample:
RewriteEngine on
...
...
RewriteRule ^(.*)blog/$ $1artikel.php
...
...
thats what I want:
www.example.com/blog/ -> indexed
www.example.com/article.php -> not indexed