Wordpress auto redirect http://example.com?lang=fa to http://example.com/?lang=fa how to stop that?
This can't be done, and it isn't WordPress, it isn't even a redirect.
example.com?foo=bar isn't a real URL, so the browser corrects it to example.com/?foo=bar before it's sent out, no redirection happens
-
I can not agree with you. The WordPress ends the addresses with a slash, and when there is no trailing slash in the address, it redirects.
example.com/pane_name
will be redirected toexample.com/page_name/
, andexample.com/foo?paged=2
toexample.com/foo/?paged=2
. In both cases aHTTP 301
header is sent. – nmr May 14 '19 at 21:34 -
Both those URLs mean the same thing though, this isn't being done for SEO purposes is it? – Tom J Nowell♦ May 14 '19 at 21:39
-
Probably WordPress is trying to maintain linking consistency, it's possible that for SEO, but this is not my field. I meant only that it is not the browser changes address, and that redirection, however, takes place. – nmr May 14 '19 at 21:53
-
im moving from another cms to wordpress so its for seo.wordpress just redirect firstpage so this link
example.com/foo?paged=2
not redirecting – Jerry May 15 '19 at 6:19 -
So that case wouldn't be affected, it's only the trailing slash on the very end that matters, e.g.
/foo
vs/foo/
that Google pays attention to, see seroundtable.com/google-trailing-slashes-url-24943.html – Tom J Nowell♦ May 15 '19 at 12:10
/?
version is more correct – Tom J Nowell♦ May 14 '19 at 20:38