Results 1 to 5 of 5

Problems with .htaccess

This is a discussion on Problems with .htaccess within the Troubleshooting forums, part of the vBSEO Google/Yahoo Sitemap category; Hi, I have reviewed all of the topics about the location of sitemap_index.xml.gz but I can't seem to get the ...

  1. #1
    Junior Member
    Real Name
    Bradley J. Ulis
    Join Date
    Apr 2006
    Posts
    10
    Liked
    0 times

    Problems with .htaccess

    Hi,

    I have reviewed all of the topics about the location of sitemap_index.xml.gz but I can't seem to get the page to load correctly.

    I am not sure the problem is with the .htaccess file at all. At the moment its functioning fine with vBSEO and the rewrite rule is right with the rewrite engine line.

    Here are the first 3 lines:
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(sitemap.*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    I tried changing the rewrite rule to sitemap_index.* etc. and it does load the vbseo_getsitemap.php file. However, it keeps puking out garbled code rather than xml.

    By opening the data folder and looking directly at the xml.gz file it looks fine.

    What could be going wrong with this?

    you may see for yourself at http://www.stockideas.net/sitemap_index.xml.gz

    -Brad

  2. #2
    Junior Member
    Real Name
    Bradley J. Ulis
    Join Date
    Apr 2006
    Posts
    10
    Liked
    0 times
    I rewrote the .htaccess file to cut out the vbseo_getsitemap file. It wasn't producing any comprehensible code.

    So, to circumvent it, I wrote a rewrite rule for every file in the data directory.

    sitemap_index.xml.gz -> /vbseo_sitemap/data/sitemap_index.xml.gz

    sitemap_1.xml.gz -> /vbseo_sitemap/data/sitemap_1.xml.gz

    and so on

    is there any way to fix the problem with vbseo_getsitemap?

  3. #3
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    Hello Bradley,

    please post the final .htaccess file that worked for you.
    Also, did you tried the original .htaccess without RewriteBase directive?

  4. #4
    Junior Member
    Real Name
    Bradley J. Ulis
    Join Date
    Apr 2006
    Posts
    10
    Liked
    0 times
    Here is my .htaccess file (turns out there is nothing wrong with it at all, its the vbseo_getsitemap.php file that was giving me headaches)

    Code:
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(sitemap_index.*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/data/sitemap_index.xml.gz [L]
    RewriteRule ^(sitemap.*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/data/$1 [L]
    
    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums)
     
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} (admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.*)$ $1 [L]
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_FILENAME} !chat
    RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
    
    RewriteRule ^(sitemap.*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    As for RewriteBase, I need it or seem I get Internal Server Errors.

  5. #5
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    Hello,
    turns out there is nothing wrong with it at all, its the vbseo_getsitemap.php file that was giving me headaches
    PM sent

Similar Threads

  1. Add "www." in .htaccess
    By Jason|Xoxide in forum Custom Rewrite Rules
    Replies: 8
    Last Post: 03-31-2006, 11:54 AM
  2. Any Mac OS X users having problems with vBSEO?
    By MrNase in forum General Discussion
    Replies: 1
    Last Post: 02-20-2006, 12:38 PM
  3. Old .htaccess makes Problems
    By Pagan in forum General Discussion
    Replies: 3
    Last Post: 02-11-2006, 05:39 PM
  4. Problems with IonCube VBSEO 2.4
    By Lazer in forum Troubleshooting
    Replies: 3
    Last Post: 02-04-2006, 11:03 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
  •