How to do lots of 301 Redirect (Tomcat?

301 Redirect for index.html?

  • For some reason, Google Webmaster Tools shows that I have crawl errors because of other sites linking to www.ciagent.com/index.html, but that file doesn't exist. I use index.php (WordPress). I want to get rid of these crawl errors, so I want to 301 redirect the nonexistent index.html to the root of my website. This is my current .htaccess code: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> I tried to add this line: redirect 301 /index.html http://www.ciagent.com But this 'breaks' my website. What can I add to make sure that requests for index.html get properly redirected to my www.ciagent.com root? Thanks in advance.

  • Answer:

    I can't give you htaccess advice that will work - wordpress doesn't always play nice with htaccess files, but another thing you could do is create an index.html page and index.htm and put a metarefresh redirecting to ciagent.com. You could probably find one that does the 301 redirect.

Finne at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

http://www.webweaver.nu/html-tips/web-redirection.shtml You probably need to use RedirectMatch 301 (.*)\.html$ http://www.ciagent.com%241.php

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.