It’s not about the code, it’s what the code does. You want Apache to somehow translate کت-و-شلوار to id 7, so your php script can load article 7.
However Apache can’t do that, because it does not know that article کت-و-شلوار has id 7.
In the other thread we’re using the title of the article in the URL as well, so the problem doesn’t occur; in the other thread we rewrite from /کت-و-شلوار to /article.php?article=کت-و-شلوار instead of from /کت-و-شلوار to /article.php?acticle=7.
Do you see the difference?
ok, i purpose is rewrite from /کت-و-شلوار to /article.php
may you bad understand my purpose…
you sitepoint.com/forums considered that title to url. like:
title:
Oh no, I completely understand what you want to do, but it can’t be done …
You can’t rewrite from /کت-و-شلوار to /article.php?id=7. It’s impossible, because Apache doesn’t know that کت-و-شلوار is article id 7, only PHP knows that, but Apache can’t ask PHP (unless you use a RewriteMap, but most hosts don’t allow you to do this).
What you could do is rewrite from /کت-و-شلوار to /article.php?url=کت-و-شلوار , but as we’ve seen in the other thread that doesn’t work because Apache screws up the encoding.
The only option I see now is that you could rewrite from say /7/کت-و-شلوار to /article.php?id=7, but that’s about it …