如何使用带通配符的 mod_rewrite 重写以下内容:
http://www.serverurl.com/glossary/WordFind.php?wordInput=(Dynamic Wildcard Word Here)
到:
http://www.serverurl.com/index.php?option=com_glossary&Itemid=326&view=word&word=(Dynamic Wildcard Word Here)
答案1
经过测试并使其正常工作。
RewriteEngine On
RewriteCond %{QUERY_STRING} ^wordInput=(.*)$
RewriteRule ^/glossary/WordFind\.php.*$ /index.php?option=com_glossary&Itemid=326&view=word&word=%1 [R]