0
我都与我的重写感到困惑。我要做到以下几点:使用.htaccess删除部分网址。 404重写后
- example.com/ 不/需要的index.php→example.com/index.php
- example.com/ 不/需要 /文件夹/→ example.com/folder/
- 查询参数应保留
我已经有一个重写规则,没有工作:
Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteBase/
RewriteRule ^not/needed(.*)$ $1 [L,R=302,QSA]
但是在重写之后,我得到了404。我怎么能告诉服务器它应该显示来自原始URI的内容?