0
RewriteEngine on
RewriteRule ^([A-Za-z0-9-_]+)$ index.php?paste=$1 [L]
正如你可以在上面看到它需要site.com/index.php?paste=pasteID
并把它变成site.com/pasteID
Mod-rewrite;阿帕奇规则
现在我想知道的方式,我可以编辑粘贴这样这样。
site.com/index.php?paste=pasteID&page=edit
site.com/pasteID/edit
有没有反正我可以做到这一点?
你您的规则解释是不正确的,也许这就是你的困惑来自:您的规则做:他们内部重写请求'site.com/ pasteID'到'site.com/index.php? paste = pasteID&page = edit'。反之亦然。配置服务器时始终从_clients_的角度来看。因为它是由服务器处理的客户端请求。这并不是说服务器发送一些可能是请求的重写的url。 – arkascha 2013-02-23 11:25:47