logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$4
rewrite

is possible to have a permalink
www.sitename.it / id / www.kijiji.com without point changes with the -

regards cristian

This question has been answered.

crisdany6 | 09/10/11 at 8:07am Edit


The experts have suggested, on average, a prize of $10 for this question.

(4) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    09/10/11
    8:28am
    Kannan C says:


    /%post_id%/www.kijiji.com

    This will work only for posts

    • 09/10/11 8:51am

      crisdany6 says:

      I try to be more clear

      if the title and "www.kijiji.it and a classifieds website"
      must be
      www.sitename.it / 4 / www.kijiji.com-and-a-classifieds-website
      changing RewriteRule...

  • avatar
    Last edited:
    09/10/11
    10:28am
    Jurre Hanema says:

    Try dropping this into your functions.php:


    remove_filter( 'sanitize_title', 'sanitize_title_with_dashes');
    add_filter('sanitize_title', 'wpq_sanitize_title');

    function wpq_sanitize_title($title)
    {
    $title = strip_tags($title);
    // Preserve escaped octets.
    $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);
    // Remove percent signs that are not part of an octet.
    $title = str_replace('%', '', $title);
    // Restore octets.
    $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title);

    if (seems_utf8($title)) {
    if (function_exists('mb_strtolower')) {
    $title = mb_strtolower($title, 'UTF-8');
    }
    $title = utf8_uri_encode($title, 200);
    }

    $title = strtolower($title);
    $title = preg_replace('/&.+?;/', '', $title); // kill entities
    $title = preg_replace('/[^%a-z0-9 ._-]/', '', $title);
    $title = preg_replace('/\s+/', '-', $title);
    $title = preg_replace('|-+|', '-', $title);
    $title = trim($title, '-');

    return $title;
    }


    This allows points in the post name and takes effect on all newly published posts.

  • avatar
    Last edited:
    09/10/11
    4:20pm
    M. Daniel says:

    You can try add this rewrite rule to your .htaccess file:

    RewriteCond %{REQUEST_FILENAME} !-f
    # RewriteCond %{REQUEST_URI} !..+$
    RewriteCond %{REQUEST_URI} !/$
    RewriteRule (.*) $1/ [R=301,L,QSA]


    You should backup your current .htaccess file before!

    Additionaly you should read this post:
    http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/

  • avatar
    Last edited:
    09/12/11
    12:50am
    ej_emman says:

    hello crisdany6,

    It was not really clear for me, of what you really want to happen but I get some Idea on you second demotion.
    Maybe you just need this. placing it to your permalink custom structure.

    /%post_id%/%postname%/

This question has expired.



crisdany6 voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.