How can i translate or remove some of the the mod_rewrite rule parameters?
-
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/(.+)/?$ … etcto
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.
- The topic ‘How can i translate or remove some of the the mod_rewrite rule parameters?’ is closed to new replies.