I have a file .conf
in my server apache with the redirects and I want to redirect a url with parameters. An example is this:
https://example.com/pre
You can not redirect a URL with query string
using Redirect
directive as it doesn't match against ?PageSpeed=noscript
. You need to use Mod-rewrite
.
Assuming mod-rewrite
module is enabled on your server , you can use something like the following in your Apache config or htaccess
RewriteEngine on
RewriteCond %{QUERY_STRING} ^PageSpeed=noscript$ [NC]
RewriteRule ^/?presente/decoracao/teu-sorriso/?$ /presente/decoracao/teu-sorriso? [L,R=301]