The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] How can i translate or remove some of the the mod_rewrite rule parameters? (5 posts)

  1. BoInG
    Posted 11 years ago #

    Now i'm trying to make an mod_rewrite rule for my site. But i have some problems customizing it.

    1. I will like to translate some words from the mod_rewrite rule:
    This one:
    RewriteRule ^page/?([0-9]{1,})/?$ /site/index.php?&pag...
    RewriteRule ^pagina/?([0-9]{1,})/?$ /site/index.php?&pag...

    This thing also avaible for the rest of the words: search to cauta, archive to arhiva, comments to comentarii and so on.

    2. I will like to remove the /category/ directory from the permalink.

    To make this one:
    RewriteRule ^category/(.+)/(feed|rdf|rss|rss2|atom)/?$ ... etc
    RewriteRule ^category/(.+)/page/?([0-9]{1,})/?$ ... etc
    RewriteRule ^category/(.+)/?$ ... etc

    RewriteRule ^(.+)/(feed|rdf|rss|rss2|atom)/?$ ... etc
    RewriteRule ^(.+)/page/?([0-9]{1,})/?$ ... etc
    RewriteRule ^(.+)/?$ ... etc

    (whitout category in it.)

    3.I'm having some problems also whit the search rewrite rule. It's not working (the oders work in english and is rewriting the url's perfectly). But the search mod_rewrite rule:

    RewriteRule ^search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /site/index.php?s=$1&feed=$2 [QSA,L]
    RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /site/index.php?s=$1&feed=$2 [QSA,L]
    RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /site/index.php?s=$1&paged=$2 [QSA,L]
    RewriteRule ^search/(.+)/?$ /site/index.php?s=$1 [QSA,L]

    its not doing nothing. The url remains like:


    and not like:


    Tnq again for your help and sorry for my msg, but i didnt find this kind of info after searching the forum.

  2. BoInG
    Posted 11 years ago #

    Ok. I have resolved the first 2 problems.

    To translate the mod_rewrite format into another language you will have to open wp-includes/classes.php and search there for the word you will like to change.

    After that change in .htaccess the same words whit the new one.

    Remains the 3rd guestion - i dont know what to do there.

  3. Orin
    Posted 10 years ago #

    It seems like you're looking for this plugin called "Nice Search".

  4. BoInG
    Posted 10 years ago #

    Orin - tnq for that - resolved my problem very fast :D

  5. jmesam
    Posted 10 years ago #

    what did you exactly change in wp-includes/classes.php?

    I want to translate "page" for "pagina", too, but I can't get to run ok for me. There is many 'page' on it.

    Thank you in advance

Topic Closed

This topic has been closed to new replies.

About this Topic