JimB814
JimB814

Reputation: 510

301 redirect of route - .htaccess code to remove appended query string of original route

I am unable to utilize other solutions found here and elsewhere to work in my case.

I have added a number of 301 redirects with the same syntax without issue, so I do not know why this is happening here.

Here's the redirect that's causing the problem:

Redirect 301 /controller/action/param http://newDomain.com/parameter

The result is:

http://newDomain.com/parameter?controller/action/param

I want to remove the query string, beginning at '?'

I would appreciate any suggestions on how to resolve this.

Thanks!

Upvotes: 0

Views: 24

Answers (1)

Abhishek Gurjar
Abhishek Gurjar

Reputation: 7476

Try with below,

Redirect 301 /controller/action/param http://newDomain.com/parameter?

We are using empty query string.

Upvotes: 1

Related Questions