开发者

Help me with a rewrite rule

开发者 https://www.devze.com 2023-01-08 12:07 出处:网络
I need help with some rewrite rule Pretty much all my pages look like this: index.php?key=guild&id=939&view=board

I need help with some rewrite rule

Pretty much all my pages look like this:

index.php?key=guild&id=939&view=board
index.php?key=player&id=300941&view=edit
index.php?key=mod&id=41&view=download
开发者_运维问答

Would i be possible to use 1 rewrite rule? Since all my pages have same $_get's

/guild/939/board
/player/300941/edit


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?([^/]+)/([^/]+)/([^/]+)$ index.php?key=$1&id=$2&view=$3 [L,QSA]

Now, to change all those links in your project is possibly quite a lot more work :)

0

精彩评论

暂无评论...
验证码 换一张
取 消