Results 1 to 3 of 3

str_replace for URL

This is a discussion on str_replace for URL within the General Discussion forums, part of the vBSEO Google/Yahoo Sitemap category; I made a modification on the VBSeo hook ( as described by Oleg here ) and the urls like /foro/noticias-breves-f55/12345-thread-title.html ...

  1. #1
    Senior Member amenadiel's Avatar
    Real Name
    Felipe CHW
    Join Date
    Feb 2007
    Location
    Santiago, Chile
    Posts
    168
    Liked
    0 times

    str_replace for URL

    I made a modification on the VBSeo hook (as described by Oleg here)
    and the urls like

    /foro/noticias-breves-f55/12345-thread-title.html

    are now just

    /noticias/12345-thread-title.html


    I'd like to have vbseo sitemap plugin to rewrite the same as vbseo global hook. ¿Where should I do that? ¿Should I tamper with vbseo_sitemap.php? ¿vbseo_sitemap_functions.php? ¿A plugin perhaps?

  2. #2
    Senior Member amenadiel's Avatar
    Real Name
    Felipe CHW
    Join Date
    Feb 2007
    Location
    Santiago, Chile
    Posts
    168
    Liked
    0 times
    Edit: Made it. I had to perform an str replace on vbseo_sitemap_functions.php for the add url function.

  3. #3
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    You should modify vbseo_sitemap_functions.php file for that:
    FIND:
    PHP Code:
    vbseo_add_url($url$priority$lastmod$freq); 
    ADD ABOVE:
    PHP Code:
    $url str_replace('/foro/noticias-breves-f55/''/noticias/',$url); 
    Edit: ok, great

Posting Permissions

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