Results 1 to 11 of 11
  1. #1
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    404 error in Webmaster Tools
    I had 100 (404) errors in my webmaster tools. It showed to the index.html page which is now php.

    This code is correct for my htaccess file right:

    Code:
    #Redirect 301 /index.html http://www.the-best-web-hosting-service.com/index.php
    Here is what my webmaster tools shows:
    Crawl errors

    Code:
    Pages that link to http://www.the-best-web-hosting-service.com/index.html
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  2. #2
    Full Member Lanny's Avatar
    Join Date
    April 7th, 2010
    Location
    Deep South
    Posts
    330
    redirect is not working
    Your redirect is not working. I suggest that you *always* test, when you add links (affiliate or navigation), put in a redirect, etc. Never assume things work properly, until you confirm that they do. Below is the error I got when I tried the URL in your post:

    Oops! This link appears to be broken.
    Suggestions:
    Go to http://www.*the-*best-*web-*hosting-...om/*index.*php
    Search The Best Web Hosting Service - Web Hosting Reviews For Consumers for index
    Search on Google:


    P.S.
    At this moment, I am using the Chrome web browser on M$ Windows XP

  3. #3
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    Quote Originally Posted by Lanny View Post
    Your redirect is not working. I suggest that you *always* test, when you add links (affiliate or navigation), put in a redirect, etc. Never assume things work properly, until you confirm that they do. Below is the error I got when I tried the URL in your post:

    Oops! This link appears to be broken.
    Suggestions:
    Go to http://www.*the-*best-*web-*hosting-...om/*index.*php
    Search The Best Web Hosting Service - Web Hosting Reviews For Consumers for index
    Search on Google:


    P.S.
    At this moment, I am using the Chrome web browser on M$ Windows XP
    Hey Lanny,

    Isn't my 301 code correct?

    You know what I don't have my index.html page uploaded I bet that is it! Can you try again in a sec please?

    Thanks,
    Garen
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  4. #4
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    it is not directing to my php one and I don't know why! Just uploaded the HTML one.
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  5. #5
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    If someone can help me fix this I am willing to pay them paypal.
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  6. #6
    ABW Ambassador 2busy's Avatar
    Join Date
    January 17th, 2005
    Location
    Tropical Mountaintop
    Posts
    5,636
    Try this:

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
    RewriteRule ^index\.html$ http://www.yourdomain.com/ [R=301,L]
    RemoveHandler .html .htm
    AddType application/x-httpd-php .php .html
    AddHandler application/x-httpd-php .htm .html
    That takes index.html/index.php out of the equation. If it is a WP site it should have generated code to the .htaccess file to do that for you if it is set up right.
    Some hosts need to adjust their settings to allow this to work, but most hosts have no problem. This code is for sites running on Unix/Linux/Apache. If it does not address the problem ask your host for assistance. Good luck.

  7. #7
    ABW Ambassador JoyUnltd's Avatar
    Join Date
    January 19th, 2005
    Location
    Emerald City
    Posts
    2,019
    You may have to use: AddHandler application/x-httpd-php5 if PHP 5.x is running on your server. This worked for me.

    P.S. You do have "RewriteEngine On" at the top, right?
    P.P.S. - Just noticed you had a "#" before "Redirect" Putting a # before a directive makes it inactive in an htaccess file. Remove the # before all directives you want to be active.
    Last edited by JoyUnltd; January 9th, 2011 at 05:39 AM. Reason: p.s.
    Renée
    Pay no attention to that woman behind the curtain. -Wizardress of Oz

  8. #8
    .
    Join Date
    January 18th, 2005
    Posts
    2,973
    Test, test, test.
    Yes, always test, test, test whenever you make any change to your web site:

    A week ago, I was concerned that my newest web site was drawing traffic, but not turning the traffic into a reasonable number clicks on product advertisements at my site. I couldn't see anything wrong, and I feared the worst: somehow, the project that I'd worked on for the past 10 weeks just wasn't going to work -- even though it was drawing decent traffic, the visitors were clicking on ads at about 10% the rate I'd expected, meaning I'd never earn much revenue.

    Finally, dejected and deflated, I decided to do what I should have done all along: start working through an old web-site-launch checklist that I'd started but never finished a few years ago. One of the first steps was to view the site using five different browsers. While I was fine-tuning the site, I had only viewed it using FireFox and Safari, and it looked fine.

    When I viewed my new site using MS Internet Explorer, Chrome, and Opera, all of the link text was visible on my pages, but NOT as hyperlinks.

    I quickly discovered a typographical error generated by the script I'd written to generate my HTML pages (an extraneous quotation mark inside the <a> tag, so the tag (simplified) read <a "href="url">). Somehow, my versions of Firefox and Safari "knew" how to interpret around this mistake, but the other browsers could not.

    Of course, the error was replicated for tens of thousands of links that appeared on all 2,000+ static content pages on the site, all generated by my script (which took about 12 hours to generate all the pages).

    I fixed the typo, generated some test pages, and verified that they worked with all 5 browsers, and then I started the process of re-generating the full set of files and uploading them to my web server.

    Within a few hours (before I'd even uploaded 20% of the corrected pages), I saw a sharp increase in clicks from my site to my advertisers, and then I saw an advertising fee reported (thank goodness for ShareASale's real-time reporting). The next day, I saw that I'd also earned advertising fees from Amazon for the new site (which is now performing within the range I'd projected more than two months ago).

    Test, test, test. This experience has reminded me to dig out the preliminary web-site-launch checklist that I'd started working on a few years ago; I certainly "knew better" but still made the same mistake, so spending some time now to refine and then methodically use the checklist will likely save me much more time in the coming months.
    Last edited by markwelch; January 9th, 2011 at 07:13 AM. Reason: removed extraneous comments

  9. #9
    Full Member
    Join Date
    November 21st, 2010
    Posts
    230
    I had to re-read this thread twice to make sure someone pointed out the actual problem and fortunately JoyUnltd caught it.

    a # in the first column of .htaccess declares it as a comment. therefore the redirection is a comment here, not an actual redirect.

  10. #10
    ABW Ambassador JoyUnltd's Avatar
    Join Date
    January 19th, 2005
    Location
    Emerald City
    Posts
    2,019
    Quote Originally Posted by bradk View Post
    ...a # in the first column of .htaccess declares it as a comment. therefore the redirection is a comment here, not an actual redirect.
    The 's in the details, happy this solved it for you. Just a few days ago, I drove myself crazy with exactly the same thing! Moved my site to a new hosting plan, had to do some troubleshooting in the .htaccess & commented out a bunch of stuff then didn't uncomment back a couple of things. That's why I finally noticed the "#"....

    P.S. - Payment due is "pay it forward" at ABW when you can.
    Last edited by JoyUnltd; January 10th, 2011 at 05:46 AM. Reason: p.s.
    Renée
    Pay no attention to that woman behind the curtain. -Wizardress of Oz

  11. #11
    Full Member silver93350's Avatar
    Join Date
    March 8th, 2008
    Location
    Kansas City
    Posts
    323
    <------idiot,

    I got it fixed now. Yeah, weird on the # because I am not a scripter or anything, somehow it got changed after a year of being good. Kind of makes you wonder if someone didn't get into my stuff (my competitors) and try to destroy my site. I learned a valuable lesson though

    Thanks to everyone at ABW for helping me

    Garen
    [URL=http://www.the-best-web-hosting-service.com/]Best Web Hosting Service[/URL] [COLOR=Blue]- Quality Reviews![/COLOR]

  12. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Webmaster tools - googlebot error message
    By teezone in forum Search Engine Optimization
    Replies: 7
    Last Post: June 29th, 2011, 11:09 PM
  2. ae.pl More Results error: 404
    By wdycus in forum Cusimano.com Scripts
    Replies: 1
    Last Post: July 26th, 2009, 07:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •