重写到友好的网址php

时间:2012-10-12 23:35:26

标签: php .htaccess

  

可能重复:
  Rewriting an arbitrary number of path segments to query parameters

htaccess`重写但我不确定如何重写多个地址获取

我从头开发了一个论坛,想要改变

url = view_topic.php?cat=$cat&sub=$sub&tid=$tid

view_topic.php?catname/subname/topicname

一些帮助会很棒

1 个答案:

答案 0 :(得分:1)

你尝试过这样的事吗?

Options +FollowSymlinks
RewriteEngine On

RewriteRule ^viewtopic/([a-z])/([a-z])/([a-z])$ viewtopic.php?cat=$1&sub=$2&tid=$3 [NC,L]