Speedy Wap
Speedy Wap

Reputation: 488

htaccess for multilingual site

i want the htaccess code which would allow just letters and numbers from all languages to be displayed properly.

the url stucture is:

http://example.com/word-{here is the first letter of the the keyword}/{here is the keyword it self}/

I am looking at

Rewriterule ^word-[a-z0-9]/[a-z0-9]+/ index.php?key=$1&keyword=$2 [L]

I want one where if the keyword is not english it still works.

Thank you.

Upvotes: 0

Views: 300

Answers (2)

Speedy Wap
Speedy Wap

Reputation: 488

Rewriterule ^word-[a-z0-9]/[a-z0-9]+/ index.php?key=$1&keyword=$2 [L] should be fine. but i would suggest using php for url rewriting.

Upvotes: 0

Piskvor left the building
Piskvor left the building

Reputation: 92752

Would "match anything" help?

Rewriterule ^word-(.|(%[a-z0-9A-Z]{1,2})+)/([^/]+)/ index.php?key=$2&keyword=$3 [L]

Upvotes: 1

Related Questions