I'm trying to have all requests going to //my.domain/download?id=xx
(be it http or https) be processed by /path/to/my/download.php?id=xx
.
I've tried all sorts of RewriteRule
rules to no avail, so there's no point in me posting anything I have, but this is a Wordpress
install, so this shouldn't conflict with WP's existing rules, which are:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I would very much appreciate an explanation for any provided answer. Thank you!
EDIT
I already took a look at Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About Mod_Rewrite Rules but Were Afraid to Ask and can't seem to even pinpoint what section would cover this situation, as all that is too general. I'm looking for help wiht this specific situation.
EDIT 2
This is the code that is failing, with a 404, even if https://htaccess.madewithlove.be/ sais it shoudl all be good:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^download
RewriteRule ^download(.*)$ wp-content/themes/XXX/inc/download.php$1
EDIT 3 I was having unrelated issues. For anyone else interested, see my answer below for the rules that worked.