Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jul 2009
    Posts
    495
    Plugin Contributions
    0

    Default htaccess help please?

    Hi there,
    I have had these rules in my htaccess for a while on my old server, iv now moved server and for some reason google can no longer find my sitemaps due to a redirect error etc etc...
    Code:
    RewriteEngine On
    # redirects any URL that includes: record_company.php/password_forgotten.php
    RedirectMatch Permanent ^/(.*[record_company.php]+) /page_not_found.php
    # redirects any URL that includes: /images/wp- with 'wp-' being anything that ends with '.php'
    # this allows for images named such as 'wp-header.jpg' to work
    RedirectMatch Permanent ^/(.*[images]+)/(wp-.*\.php)$ /page_not_found.php
    # Don't rewrite any URIs ending with a file extension (ending with .[xxxx])
    RewriteCond %{REQUEST_URI} !\.[a-zA-Z]{2,4}$
    # Don't rewrite admin directory
    RewriteCond %{REQUEST_URI} !^/ADMINAREA/.* [NC]
    # Don't rewite shop directory
    RewriteCond %{REQUEST_URI} !^/shop/.* [NC]
    # Don't rewrite editors directory
    RewriteCond %{REQUEST_URI} !^/editors.* [NC]
    # Don't rewrite cPanel directories
    RewriteCond %{REQUEST_URI} !/cpanel.* [NC]
    RewriteCond %{REQUEST_URI} !/frontend.* [NC]
    # Handle all other URIs using Zen Cart (index.php)
    RewriteRule (.*) /index.php?%{QUERY_STRING} [L]
    no idea when it comes to htaccess

    but which of these would stop google finding my sitemaps??


    p.s ADMINAREA is my directory renamed for security on here
    i may not know how yet, but i soon will....i hope :)

  2. #2
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: htaccess help please?

    Google looks at your ROBOTS.TXT file to find the location of your XML sitemap. When you moved the site did you move your robots.txt file over as well? If not you need to add that (with the proper link and authorization to your XML sitemaps). If you added it, and it still is not working you need to make sure the path to the XML sitemap is correct.

    You might also want to check your Google Webmaster tools section to make sure it is pointing to the correct location as well.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  3. #3
    Join Date
    Jul 2009
    Posts
    495
    Plugin Contributions
    0

    Default Re: htaccess help please?

    yep moved the robots txt over etc
    webmasters is looking in the right place, it finds my sitemap when i rename it to .htaccess.bak
    perfect find etc etc...
    rename it back to .htaccess
    finds nothing... :S
    i may not know how yet, but i soon will....i hope :)

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: htaccess help please?

    Just a simple suggestion: have you tried commenting-out or removing individual lines to narrow down which one is causing your problem?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jul 2009
    Posts
    495
    Plugin Contributions
    0

    Default Re: htaccess help please?

    i did comment out a few that i thought could cause the problem, but still the same :S
    i may not know how yet, but i soon will....i hope :)

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: htaccess help please?

    "a few" doesn't sound like it's a thorough enough test, as evidenced by your results
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jul 2009
    Posts
    495
    Plugin Contributions
    0

    Default Re: htaccess help please?

    Quote Originally Posted by DrByte View Post
    "a few" doesn't sound like it's a thorough enough test, as evidenced by your results
    lol yeah i know, but the few that i didn't comment out were to do with record company/password forgot... images-wp.jpg etc....

    il have to have another go on it when i get time(god work sucks when i have to go out on site lol )
    i may not know how yet, but i soon will....i hope :)

  8. #8
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: htaccess help please?

    Have you checked the permissions on the robots.txt file? It could be that the .htaccess is restricting access to that (may be obvious.)

    When I try to access your robots.txt I get a 403 forbidden error message currently (leading me to believe the file is being blocked.)

    When you rename the .htaccess, that in effect removes the restrictions and thus enables it to be found.

    Just some more thoughts for you.

    I don't know if this is the site in question, but I was trying to access it on the tools-draper site. I'm assuming (may be a bad idea) that this is the site in question?
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  9. #9
    Join Date
    Jul 2009
    Posts
    495
    Plugin Contributions
    0

    Default Re: htaccess help please?

    Quote Originally Posted by econcepts View Post
    Have you checked the permissions on the robots.txt file? It could be that the .htaccess is restricting access to that (may be obvious.)

    When I try to access your robots.txt I get a 403 forbidden error message currently (leading me to believe the file is being blocked.)

    When you rename the .htaccess, that in effect removes the restrictions and thus enables it to be found.

    Just some more thoughts for you.

    I don't know if this is the site in question, but I was trying to access it on the tools-draper site. I'm assuming (may be a bad idea) that this is the site in question?
    on one of 3 sites yes m8, tools-draper, and 2 others etc...
    ahh didn't think of htaccess restricting robots...hmmmm


    hmmm in my htaccess file that comes with ZC1.3.9g
    added txt to the "<filesmatch>" part, seems i now have access to it
    Last edited by spid3r1987; 11 Oct 2010 at 02:44 PM.
    i may not know how yet, but i soon will....i hope :)

  10. #10
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: htaccess help please?

    So did that fix everything?
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Help Please - need help with .htaccess file
    By timb22 in forum General Questions
    Replies: 14
    Last Post: 6 Apr 2015, 08:21 PM
  2. htaccess wording help please.
    By joejoejoe in forum Basic Configuration
    Replies: 2
    Last Post: 2 Nov 2011, 08:38 PM
  3. .htaccess file check please : )
    By gaffettape in forum General Questions
    Replies: 4
    Last Post: 10 Jun 2010, 09:14 PM
  4. htaccess files help please
    By pasb in forum Installing on a Linux/Unix Server
    Replies: 9
    Last Post: 27 Aug 2009, 07:18 PM
  5. Replies: 1
    Last Post: 26 Aug 2008, 01:41 AM

Posting Permissions

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