0

我已经编写了一个 .htaccess 虚 url 来重定向到用户部落(或组,因为你们大多数人可能会调用该功能)所以而不是 domain.com/groups/clan.php?id=something 我将它作为 domain.com/ 运行某物

现在我想要的是帖子而不是 domain.com/groups/view_update.php?pid=post_id 我想要 domain.com/soomething-group-name/posts/post_id

当我被难住时,我该如何存档?

这是我到目前为止的代码:

RewriteEngine On

# Make sure you only match on files/directories that don't actually exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite the first part after the `/` into a `username` parameter

RewriteRule ^(.+)$ groups/index.php?gname=$1 [L,QSA]

感谢负载:)

4

0 回答 0