Results 1 to 2 of 2

Moved to hostgator - .htaccess for sitemaps not working

This is a discussion on Moved to hostgator - .htaccess for sitemaps not working within the Troubleshooting forums, part of the vBSEO Google/Yahoo Sitemap category; I just moved to hostgator, my problem is accessing my sitemaps from the root directory using .htaccess. In my root ...

  1. #1
    Junior Member
    Real Name
    Michael
    Join Date
    Feb 2006
    Posts
    12
    Liked
    0 times

    Question Moved to hostgator - .htaccess for sitemaps not working

    I just moved to hostgator, my problem is accessing my sitemaps from the root directory using .htaccess.

    In my root directory .htaccess I have:

    Code:
    RewriteEngine On
    Options +FollowSymLinks
    
    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ /forum/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    In my /forum directory I have:

    Code:
    RewriteEngine On
    Options +FollowSymLinks
    
    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron)
    RewriteRule ^((archive/)?(.*\.php(/.*)?)?)$ vbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    What happens is that the URL:

    http://www.mysite.com/sitemap_index.xml.gz

    does NOT work, its calling vbseo.php and giving me a Page not found 404 error. I dumped the $_GET array below to see and it appears to be trying to call the vbseo_getsitemap.php script.

    Code:
    Page not foundArray (     [sitemap] => sitemap_1.xml.gz ) 
    
    [REDIRECT_STATUS] => 200
    [REQUEST_URI] => /sitemap_index.xml.gz     
    [SCRIPT_FILENAME] => /home/me/public_html/mysite/forum/vbseo.php
    [SCRIPT_NAME] => /forum/vbseo_sitemap/vbseo_getsitemap.php
    However, http://www.mysite.com/forum/sitemap_index.xml.gz, does work.

    If I stick some debug in vbseo_functions_url.php I am able to see the SERVER info above; which leads me to believe that possibly the request for vbseo_getsitemap.php is redirecting to vbseo.php.

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    The first one should not work and should be removed from your htaccess file and your webmaster tools.

    Your sitemap at google needs to match the path.
    http://www.mysite.com/forum/sitemap_index.xml.gz is the correct url as your forum is installed in /forum.


    If you want stuff in root, you should move your entire fourm to root.

Similar Threads

  1. Moved forums to main root 2 sitemaps on google
    By =Master= in forum General Discussion
    Replies: 7
    Last Post: 03-01-2010, 05:13 AM
  2. Moved Servers, Sitemaps Stopped
    By DN lodge in forum Troubleshooting
    Replies: 3
    Last Post: 11-30-2008, 03:38 PM
  3. Moved to a new server, not working. Please help!
    By Sal Collaziano in forum Troubleshooting
    Replies: 2
    Last Post: 08-30-2007, 05:36 PM
  4. moved to a new server, stopped working
    By aviv_e in forum Troubleshooting
    Replies: 5
    Last Post: 08-26-2007, 07:22 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
  •