Search code examples
.htaccesshttp-redirectquery-string

htaccess redirect to url with query string?


I would like to redirect domain.xyz/something to domain.xyz/abc/?querystring via htacess. (Most similar questions raised were intended the other way around.) Any help would be greatly appreciated! Thanks!

Redirect Query String

RewriteEngine On
RewriteCond (...)

<- a frequent answer but perhaps "the other way around" to what I'm looking for


Solution

  • Unless you have other requirements or directives in the .htaccess file then it's potentially just a straightforward redirect:

    Redirect 302 /something /abc/?querystring