在重写的URL上传递其他参数

时间:2019-04-21 11:20:16

标签: php .htaccess

我正在尝试通过主URL传递多个过滤器GET参数,但是添加和清除输入时页面似乎刷新,否则它们根本不起作用。如何在htaccess上解决此问题?目前这是我的:

RewriteEngine On
RewriteBase /
<FilesMatch ".(?:html|php)$">
SetHandler application/x-lsphp73
</FilesMatch>
RewriteRule ^/?([a-zA-Z_]+)$ index.php?page=$1 [L,QSA]
RewriteRule ^backoffice/?([a-zA-Z_]+)$ index.php?backoffice=$1 [L,QSA]
RewriteRule ^backoffice/editar/?([A-Za-z0-9-]+)/?([A-Za-z0-9-]+) index.php?backoffice=editar&editar=$1&itemid=$2 [L,QSA]
RewriteRule ^backoffice/locations/?([A-Za-z0-9-]+) index.php?backoffice=managelocations&managelocations=$1 [L,QSA]
RewriteRule ^ourfocus/?([A-Za-z0-9-]+) index.php?ourfocus=$1 [L,QSA]
RewriteRule ^resource/?([A-Za-z0-9-]+) index.php?resource=$1 [L,QSA]
RewriteRule ^view/?([A-Za-z0-9-]+)/?([A-Za-z0-9-]+) index.php?view=$1&table=$2 [L,QSA]
# 1 Month for most static assets
<filesMatch ".(css|jpg|jpeg|png|gif|js|ico|svg|mp4|json)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
php_flag display_errors 1

当前,主页是www.example.com/main,但是我需要像www.example.com/main/?initiative_types=1,2,3&other=1,2,3一样通过

0 个答案:

没有答案