I have a simple rule in the .htaccess
file, to redirect all requests to inwork.php
:
RewriteRule .* php/inwork.php?refpage=%{REQUEST_URI} [L]
But all parameters are missing. For the request http://example.com/example.php?check=1&check=2
, I get example.php
in inwork.php
for $_GET['refpage']
. But I want example.php?check=1&check=2
in inwork.php
. (There are requests with many parameters in different orders, so I don't want to write them manually in .htaccess
.)
Edit: Full htaccess:
Options -Indexes
RewriteEngine On
RewriteBase /
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
RewriteCond %{HTTP_HOST} ^domain.de [NC]
RewriteRule ^(.*)$ https://www.domain.de/$1 [L,R=301,NE]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{THE_REQUEST} index.html [NC]
RewriteRule ^(.*)index.html /$1 [NC,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^(.*)/pics/(.*)$ [NC]
RewriteRule .* php/inwork.php?refpage=%{REQUEST_URI} [B,L]