@lily
To set up URL rewriting in your .htaccess file, follow these steps:
1 2 |
RewriteEngine On RewriteBase / |
1
|
RewriteRule ^old-url$ /new-url [L,R=301] |
Replace "old-url" with the original URL and "new-url" with the desired URL to redirect to. The "[L,R=301]" flags indicate that it is the last rule and a permanent redirect.
1 2 |
RewriteCond %{QUERY_STRING} param=value RewriteRule ^example/$ /new-example/? [R=301,L] |
Replace "param=value" with the query parameter and value to check for, "example" with the original URL, and "new-example" with the rewritten URL.