Results 1 to 13 of 13

Replace clientscript path

This is a discussion on Replace clientscript path within the vBSEO Features Archive forums, part of the vBulletin Links & Resources category; Hi, I just noticed I was getting a lot of 404's for scripts in the client scripts directory. It'd be ...

  1. #1
    Senior Member
    Real Name
    Nick Le Mouton
    Join Date
    Nov 2005
    Location
    New Zealand
    Posts
    422
    Liked
    15 times

    Replace clientscript path

    Hi,

    I just noticed I was getting a lot of 404's for scripts in the client scripts directory. It'd be nice if vbSeo handled these rather than going through all the templates and making them absolute URLs.

    Am using vb 3.5.2

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

    all external scripts/style/images URLs should be working correctly because it is handled by vBSEO. Perhaps this is not path issue, but files really don't exists?

    Could you please give an example URL?

  3. #3
    Senior Member
    Real Name
    Nick Le Mouton
    Join Date
    Nov 2005
    Location
    New Zealand
    Posts
    422
    Liked
    15 times
    The scripts are working fine now as I went through all the templates and updated the paths.

    I was getting 404's like this:

    /forum/members-lounge/clientscript/vbulletin_menu.js

    The scripts were trying to be accessed by something like this:
    Code:
    <script language="javascript" src="clientscript/vbulletin_menu.js"></script>

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,741
    Liked
    168 times
    Hm.. which browser did you use? This should not be an issue: for instance, we have the same at this page (take a look in html source):
    <script type="text/javascript" src="clientscript/vbulletin_global.js">
    and it works correctly (because we have <base> tag inserted automatically where required)

  5. #5
    Senior Member
    Real Name
    Nick Le Mouton
    Join Date
    Nov 2005
    Location
    New Zealand
    Posts
    422
    Liked
    15 times
    I haven't seen any problems, nor have any of my users (as far as i know), I'm just seeing these 404 errors in my reports. Maybe a spider that doesn't know about base?

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,741
    Liked
    168 times
    Could be.. any browser supports it. but spiders should not be interested in fetching javascript
    Can you take a look in access_log to get user-agent info that requests these URLs?

  7. #7
    Senior Member
    Real Name
    Nick Le Mouton
    Join Date
    Nov 2005
    Location
    New Zealand
    Posts
    422
    Liked
    15 times
    69.19.14.23 - - [01/Dec/2005:14:39:06 -0600] "GET /forum/members-lounge/clientscript/vbulletin_menu.js HTTP/1.1" 404 14 "http://www.bimmerwerkz.com/forum/members-lounge/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"

  8. #8
    Junior Member
    Join Date
    Nov 2005
    Posts
    18
    Liked
    0 times
    This is happening due to the fact that the vBulletin file global.php writes the $style[css] variable as a relative url when you are storing your css in an external file. The $style[css] variable is added into your html via the headinclude template and you end up with some html like this:

    Code:
    <link rel="stylesheet" type="text/css" href="clientscript/vbulletin_css/style-1234xyz-00001.css" id="vbulletin_css" />
    This does not work for a lot of your vBSEO'd pages (like if you seo /faq/) because of the relative url.

    Zachery from vBulletin has developed a hack to make the url absolute:

    http://www.vbulletin.org/forum/showthread.php?t=63520

    My suggestion is to use a CRR instead of the hack:

    Code:
     '^clientscript/vbulletin_css/(.*)$' => 'http://www.example.com/forumpath/clientscript/vbulletin_css/$1'
    and it does appear to work - please check it out and post results.

    Thanks,

    John
    Last edited by JohnM; 12-09-2005 at 04:15 PM.

  9. #9
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    13 times
    I think I have avoided this issue because I run vBadvanced CMPS, which has built in functions to change it to the full path. (Necessary for CMPS to work properly.)

  10. #10
    Junior Member
    Join Date
    Nov 2005
    Posts
    18
    Liked
    0 times
    I also run vBadvanced CMPS and I can tell you that some of your urls will still not display your CSS correctly if for instance you are using custom CRR's like this:

    Code:
    '^faq\.php$' => 'faq/'
    '^faq\.php\?faq=vb_faq' => 'faq/vbulletin-faq/'
    '^faq\.php\?faq=vb_user_maintain' => 'faq/user-maintain/'
    '^faq\.php\?faq=vb_board_usage' => 'faq/board-usage/'
    '^faq\.php\?faq=vb_read_and_post' => 'faq/read-and-post/'
    Please comment if I am incorrect in this assumption as now you have got me curious about the CMPS "fix" and perhaps the CRR isn't necessary.

    Thank you,

    -John

  11. #11
    Junior Member
    Join Date
    Nov 2005
    Posts
    18
    Liked
    0 times
    Quote Originally Posted by Oleg Ignatiuk
    Hello Noodles,

    all external scripts/style/images URLs should be working correctly because it is handled by vBSEO. Perhaps this is not path issue, but files really don't exists?

    Could you please give an example URL?
    Oleg,

    could you please take a look at my posts and see if this is indeed supposed to be handled internally by vbSEO and perhaps it is missing this for some reason?

    Thanks,

    John

  12. #12
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    13 times
    Oh, I don't use any CRR's.

  13. #13
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,741
    Liked
    168 times
    John,

    I've just replied to you here: forum in root trouble with faq.php CRR
    (CRR should be slightly modified to get it working)

Similar Threads

  1. replace non english characters
    By mljask in forum General Discussion
    Replies: 47
    Last Post: 10-21-2011, 05:09 AM
  2. Replace showthread link with title...
    By reefland in forum General Discussion
    Replies: 5
    Last Post: 01-31-2006, 06:29 PM
  3. URL not under sitemap path
    By BamaStangGuy in forum Troubleshooting
    Replies: 8
    Last Post: 12-19-2005, 09:12 PM
  4. Create a virtual multi-level forum path BUG
    By TopAs in forum Bug Reporting
    Replies: 2
    Last Post: 08-16-2005, 08:46 PM

Posting Permissions

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