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.
我需要将 index.php 重定向到我的根文件夹而不影响其他页面。我试过这个:
RewriteRule ^index\.php$ http://example.com/ [NC,R]
这个工作解决了以下条件下的问题
http://example.com/index.php但是当我访问诸如
http://example.com/index.php
http://example.com/index.php?option=users, 它显示为
http://example.com/index.php?option=users
http://example.com/?option=users这不应该发生。
http://example.com/?option=users
根据文档,您需要在以下内容之前添加此行RewriteRule:
RewriteRule
RewriteCond %{QUERY_STRING} ^$
这确保仅当查询字符串为空时才应用规则。
My website is used to get RSS news (for example). Users of website can format the output of results by using template syntax like mustache and can set time to receive email what hot news in a da