包含参数时的.htaccess重定向(“index.php?value = 2”)

Would anyone have suggestions on how to redirect a URL that has variables in it?

It looks like "www.homepage.com/index.php?value=home/index" would like it to simply redirect to "www.homepage.com"

I've tried:

Redirect /index.php?value=home/index /index

But it seems like "Redirect" ignores everything passed the question mark character. Is that so? Any way around it?

I am not familiar with regex, so I was hoping a simple solution is available without using that.

Thank you in advance :)

To capture Query String like value=home/indexuse mod_rewrite

Try this :

RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.+)=(.+)/(.+)$
RewriteRule ^     /?       [L,R]

Redirect is mod_alias and that is designed to handle simple URL manipulation tasks. For more complicated tasks such as manipulating the query string, use the tools provided by mod_rewrite.

https://httpd.apache.org/docs/2.4/mod/mod_alias.html