Results 1 to 14 of 14

Changing style gives an error

This is a discussion on Changing style gives an error within the Troubleshooting forums, part of the vBSEO SEO Plugin category; When changing style from the Quick style chooser, our forum gives a 404. We are running vBulletin and vBSEO on ...

  1. #1
    Member
    Real Name
    Nikke23
    Join Date
    Jul 2006
    Posts
    42
    Liked
    0 times

    Changing style gives an error

    When changing style from the Quick style chooser, our forum gives a 404. We are running vBulletin and vBSEO on a win server.

    Any clue why this is happening? When clicking on a style through admincp, it doesn't change the style.

    Only way to change the style is through the usercp.

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

    what is the resulting URL that gives 404 error and what are your current rewrite rules?

  3. #3
    Member
    Real Name
    Nikke23
    Join Date
    Jul 2006
    Posts
    42
    Liked
    0 times
    The URL is for example this:

    http://www.pokerimestari.com/?styleid=27

    And these are the customrewriterules:


    '^view\.php\?pg=([\w\-]+)$'=>'$1'
    '^cmps_index\.php$' => 'uutiset/'

    isapi rewrite:

    # this block determines how to handle sitemap
    RewriteCond Host: .*pokerimestari.com
    RewriteRule ^/((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ /vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]


    # this block determines common rules for vBulletin
    RewriteCond Host: .*pokerimestari.com
    #RewriteCond URL ^/(?!admincp/|modcp/|clientscript/|cpstyles/|images/|search\.php).*
    RewriteCond URL ^/(?!pokeriblogi/|admincp/|modcp/|clientscript/|cpstyles/|images/|search\.php).*
    RewriteRule ^/(.+?)(?:\?(.*))?$ /vbseo.php?vbseourl=$1(?2&$2) [L]

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    Please try to change this line:
    Code:
    RewriteRule ^/(.+?)(?:\?(.*))?$ /vbseo.php?vbseourl=$1(?2&$2) [L]
    to:
    Code:
    RewriteRule ^/(.*?)(?:\?(.*))?$ /vbseo.php?vbseourl=$1(?2&$2) [L]

  5. #5
    AWS
    AWS is offline
    Member AWS's Avatar
    Real Name
    Bob
    Join Date
    Feb 2006
    Location
    Pluto
    Posts
    68
    Liked
    0 times
    Must be specific to Windows Server. I can change styles from the main index and from admincp. I can't from within a forum page or thread page. I've been trying to traqck it down since I installed vbseo and can't put a finger on the problem.

  6. #6
    AWS
    AWS is offline
    Member AWS's Avatar
    Real Name
    Bob
    Join Date
    Feb 2006
    Location
    Pluto
    Posts
    68
    Liked
    0 times
    Since I use v3 here are my rules.

    Code:
    # Helicon ISAPI_Rewrite configuration file
    # Version 3.0.0.31
    
    RewriteEngine On
    RewriteCompatibility2 On
    RepeatLimit 200
    
    RewriteCond %{HTTP:Host} ^www\.justbs\.us$
    RewriteRule (.*) http\://justbs\.us/$1 [NC,R=301]
    
    #vbSEO
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    #RewriteRule ^(urllist|sitemap).*\.(?:xml|txt)(?:\.gz)?$ /vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1  [NC,L]
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
    RewriteRule ^(.*\.php(/.*)?)$ vbseo.php?vbseourl=$1 [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif)$
    RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]
    Here is a link that doesn't work from within a forum http://justbs.us/on-topic-bs/?styleid=5

    Style changes work fine from the index. Hit the index and use the style chooser and you'll see that it has no problem.

  7. #7
    Senior Member
    Real Name
    Ged
    Join Date
    Dec 2006
    Location
    UK
    Posts
    511
    Liked
    11 times
    Quote Originally Posted by AWS View Post
    Must be specific to Windows Server. I can change styles from the main index and from admincp. I can't from within a forum page or thread page. I've been trying to traqck it down since I installed vbseo and can't put a finger on the problem.

    We have a similar issue, and yes we are on a Windows server.

  8. #8
    Junior Member
    Real Name
    Craig
    Join Date
    Sep 2006
    Location
    Manchester, UK
    Posts
    13
    Liked
    0 times
    I too am having this issue, Windows server.

    The issue seems to be when the filename is missing, i.e. url.com/?styleid=1

    If you have url.com/index.php?styleid=1 it works fine.

    I did solve this issue once before on isapirewrite v2, and that was by putting "\?styleid=" after the admincp|clientscript| entries, my basic understanding is that it was telling vbseo not to process the link or whatever and just let the server handle it, where it actually works, but since we moved to v3.1 of Isapirewrite this no longer seems to have the same effect.

    I'd appreciate it if a member of the vbseo team could maybe try the new isapirewrite version and maybe formulate some rules for it, as they have changed syntax a bit and I'd like to know that they're being imported correctly and working correctly.

    Thanks

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

    pleae try to manually disable this option in config_vbseo.php file:
    PHP Code:
        define('VBSEO_CLEANUP_REDIRECT',       0); 

  10. #10
    Junior Member
    Real Name
    Craig
    Join Date
    Sep 2006
    Location
    Manchester, UK
    Posts
    13
    Liked
    0 times
    Thanks for the reply, I'm afraid that doesn't seem to have an effect on the issue.

    I'm not sure if you're familair with isapirewrite, but a rule to rewrite the url /?styleid= to index.php/?styleid= would fix this issue for most people, but I'm not familar with writing this kind of syntax so wouldn't know where to start.

    Also for the vbSEO rules to work with v3 you need to enable v2 compatibility, see here: RewriteCompatibility2 which is why I asked if the rules could be written for v3 so they weren't using compatibility features from the previous version. Altho very little changes are made, basically just URL to %{REQUEST_URI}

    My company have bought the v3 so downgrading to the v2 isn't an option.

    Thanks for your time.

  11. #11
    AWS
    AWS is offline
    Member AWS's Avatar
    Real Name
    Bob
    Join Date
    Feb 2006
    Location
    Pluto
    Posts
    68
    Liked
    0 times
    I got this fixed.

    Here are my rules which work with isapi rewrite 3. Changing style within forums and threads now work.
    Code:
    # Helicon ISAPI_Rewrite configuration file
    # Version 3.0.0.31
    
    RewriteEngine On
    RepeatLimit 200
    RewriteBase /
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    RewriteCond %{QUERY_STRING} !vbseourl=
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
    RewriteRule ^(.*\.php(/.*)?)$ vbseo.php?vbseourl=$1 [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif)$
    RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.*)$ vbseo.php?vbseourl=$1 [L,QSA]
    Hope this helps.
    Last edited by AWS; 02-25-2008 at 09:11 PM.

  12. #12
    Junior Member
    Real Name
    Craig
    Join Date
    Sep 2006
    Location
    Manchester, UK
    Posts
    13
    Liked
    0 times
    Fantastic Bob, dropped them straight in, had to add RewriteBase / but with that every problem solved, even sorted the trailing slash on folder names, I'd been adding folders we needed manually to the original rules and it was getting quite a mess.

    Big relief for me, thanks

    Craig

  13. #13
    AWS
    AWS is offline
    Member AWS's Avatar
    Real Name
    Bob
    Join Date
    Feb 2006
    Location
    Pluto
    Posts
    68
    Liked
    0 times
    Your welcome.
    I actually forgot RewriteBase /. I do have it in my .htaccess.
    I edited my post to include it in case this helps any other with IIS.

  14. #14
    Junior Member
    Real Name
    Jan
    Join Date
    Nov 2007
    Location
    Texas
    Posts
    13
    Liked
    0 times
    Thanks for posting this!

    This actually helped us out as we were not sure which rules we should use! Little did we know that they are contained in the vBSEO package, isapi_rewrite.txt file.

Similar Threads

  1. Something like this possible with this style?
    By Schahab in forum vBSEO.com Styles
    Replies: 2
    Last Post: 12-30-2007, 06:39 PM
  2. little div error in style?
    By Luciano in forum Template Modifications
    Replies: 0
    Last Post: 12-05-2007, 03:31 AM
  3. Changing Password Syntax Error
    By brand0n in forum Troubleshooting
    Replies: 1
    Last Post: 09-23-2007, 08:48 AM
  4. Custom error pages in vb-style
    By ignicoccus in forum Custom Rewrite Rules
    Replies: 5
    Last Post: 02-07-2007, 12:17 PM
  5. Got this error, without changing anything?
    By Masetek in forum Troubleshooting
    Replies: 1
    Last Post: 08-20-2006, 09:03 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
  •