.htaccess 用参数重写url
下面是我正在使用的htaccess文件。我的分页url为domain.com/?page=1。现在,这只获取第一页记录,而不获取下一页记录,即使domain.com/?page=2已传递到url。 我怀疑这是因为重写url,因为它在本地主机上工作正常,而在服务器端只获取第一页记录.htaccess 用参数重写url,.htaccess,.htaccess,下面是我正在使用的htaccess文件。我的分页url为domain.com/?page=1。现在,这只获取第一页记录,而不获取下一页记录,即使domain.com/?page=2已传递到url。 我怀疑这是因为重写url,因为它在本地主机上工作正常,而在服务器端只获取第一页记录 <IfModule mod_rewrite.c> AddHandler application/x-httpd-php72 .php RewriteEngine On # Removes i
<IfModule mod_rewrite.c>
AddHandler application/x-httpd-php72 .php
RewriteEngine On
# Removes index.php from ExpressionEngine URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>
通过将重写url更改为RewriteRule ^.*$index.php?url=$1[QSA,PT,L]。它解决了我的问题