How to redirect all requests to index.php and keep the other GET params?

后端 未结 2 1097
逝去的感伤
逝去的感伤 2020-12-03 21:23

Here\'s what I\'ve got so far:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !index.php
RewriteRule .* index.php?url=$0 [L]

But when I

2条回答
  •  春和景丽
    2020-12-03 21:59

    RewriteEngine on
    
    RewriteCond %{REQUEST_FILENAME} !index.php
    RewriteRule .* index.php?url=$0 [QSA,L]
    

    You need the QSA in your rewrite rule.

提交回复
热议问题