Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这种类型的页面:-
xyz.com?q=Apple+Ipod+touch
我希望将其转换为类型
xyz.com/Apple+Ipod+touch
如何才能做到这一点 ?
尝试:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
如果您有更具体的 URL 格式,您可以将其细化RewriteRule为不那么通用(即不匹配所有内容)并且更具体到您的 URL,但这应该有效。
RewriteRule