1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP] How to replace %3A, %2F & %3D with slashes, question marks, etc inside URLs

Discussion in 'Blogging' started by staycoolmen2006, Sep 25, 2012.

  1. staycoolmen2006

    staycoolmen2006 Regular Member

    Joined:
    Aug 5, 2010
    Messages:
    345
    Likes Received:
    147
    Home Page:
    I am running a Wordpress blog @ bloggertweaks.com but having URL prob. When i search my post url in google it shows something like

    [​IMG]

    Please help to replace %3A, %2F & %3D with slashes, question marks, etc inside URLs
     
  2. judson

    judson Power Member

    Joined:
    Nov 29, 2009
    Messages:
    530
    Likes Received:
    319
    Occupation:
    Fulltime Newbie IM
    Location:
    Sub Ubi
    There is a great Search and Replace plugin that would allow you to search for the offending bits in your database tables and replace them.
    http://wordpress.org/extend/plugins/search-and-replace/

    Be careful when you use it though. If you are not too sure what you are doing, you can corrupt your database with this plugin.

    Assuming that that is where they are.

    You have bigger problems though ....
    Page load time: 5.39s
    Total page size: 1.26MB
    Total number of requests: 112

    Work on that while you are at it.
     
  3. staycoolmen2006

    staycoolmen2006 Regular Member

    Joined:
    Aug 5, 2010
    Messages:
    345
    Likes Received:
    147
    Home Page:
    hey buddy thxn for plugin...please tell me how did you get those statistics ...?
     
  4. Zapdos

    Zapdos Power Member

    Joined:
    Oct 22, 2011
    Messages:
    597
    Likes Received:
    708
    Location:
    Eastern North Carolina
    He probably used firebug + yslow.

    As for your problem, you need to use urldecode() on them. You can do this using filters.
     
  5. staycoolmen2006

    staycoolmen2006 Regular Member

    Joined:
    Aug 5, 2010
    Messages:
    345
    Likes Received:
    147
    Home Page:
    please elaborate buddy... i m still struggling to solve this issue..... :(
     
  6. judson

    judson Power Member

    Joined:
    Nov 29, 2009
    Messages:
    530
    Likes Received:
    319
    Occupation:
    Fulltime Newbie IM
    Location:
    Sub Ubi
    Used this site for the stats

    http://gtmetrix.com/
     
  7. staycoolmen2006

    staycoolmen2006 Regular Member

    Joined:
    Aug 5, 2010
    Messages:
    345
    Likes Received:
    147
    Home Page:
    i use this and got the result...How to use urldecode() ?
     
  8. judson

    judson Power Member

    Joined:
    Nov 29, 2009
    Messages:
    530
    Likes Received:
    319
    Occupation:
    Fulltime Newbie IM
    Location:
    Sub Ubi
    If the problem is not one of database values, and you need to be using urlencode, then you are going to have to fiddle with your theme files, or your functions.php

    Here's a start. A similar query ... http://stackoverflow.com/questions/274157/wordpress-php-url-encoding-issue

    The very short version is that the bit of your theme/template that is printing out that URL is not encoding it properly. Unfortunately, you are going to get your hands dirty with .php files to figure out where exactly the problem is, and how to then wrap that around the urldecode() function in PHP before outputting that in the pages.

    Wordpress however, allows you to add filters. They are basically PHP functions that get triggered at certain points in the page generation. These allow you, either in the functions.php or via plugin, to make changes to your theme's output, without actually touching the rest of your theme. Here's an example.
    http://djzone.im/2011/05/wordpress-search-urldecode-bugfix/

    Without specifics on the exact functions that your theme is using to generate the pages, any explanation beyond this is not going to be very helpful.