我需要一个转向的htaccess代码:
site.com/category/example
到
site.com/list.php?catID=example
我该怎么做?
我还需要:
site.com/read/today
到
site.com/show.php?id=today
请帮帮我。我有一些东西,但无法让它对我有用。这是我得到的:
RewriteRule ^([a-zA-Z0-9\-]+)$ $1/anasayfa [L,NC]
RewriteRule ^([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)$ sitegoster.php?id=$1&kayit_id=$2 [L,NC]
试图修改这些但失败了。
答案 0 :(得分:0)
请尝试以下规则:
RewriteRule ^category/([a-zA-Z0-9-]+)$ list.php?catID=$1 [L, NC]
RewriteRule ^read/([a-zA-Z0-9-]+)$ show.php?id=$1 [L, NC]