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.
我有一个可以从 URL 访问的索引页面http://mysite.com。我可以输入查询字符串?type=small,?type=medium或者?type=large显示不同的结果。但是,我希望用户能够使用 URL 访问该站点,http://mysite.com/small而http://mysite.com/medium无需http://mysite.com/large创建单独的页面。
http://mysite.com
?type=small
?type=medium
?type=large
http://mysite.com/small
http://mysite.com/medium
http://mysite.com/large
这可以做到吗?怎么做?
RewriteEngine On RewriteRule ^(small|medium|large) /?type=$1