How do I use robots.txt to disallow folders which are being crawled due to a bad URL structure? They're currently causing a duplicate page error.
The URL which been crawled incorrectly is:
www.abc.com/forum/index.php?option=com_forum
However, The correct page is:
www.abc.com/index.php?option=com_forum
Is robots.txt a correct way of excluding this? I'm thinking about using:
Disallow: /forum/
Will that not block legitimate content in the /forum/
folder of my site?
/forum/index.php?option=com_forum
isn't the correct URL, what are you serving when a crawler hits that page? The correct thing would be to serve a 404 not found error, or a redirect to where the page actually exists. If you do that, you will have no problems with duplicate pages.