• Resolved boing

    (@boing)


    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…
    to
    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

    to
    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:

    https://www.mysite.ro/site/index.php?s=mysearchedword

    and not like:

    https://www.mysite.ro/site/search/mysearchedword/

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter boing

    (@boing)

    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.

    It seems like you’re looking for this plugin called “Nice Search”.

    Thread Starter boing

    (@boing)

    Orin – tnq for that – resolved my problem very fast ??

    jmesam

    (@jmesam)

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can i translate or remove some of the the mod_rewrite rule parameters?’ is closed to new replies.