-2
I would like to know how to redirect a url with parameters on .htaccess
. I have a URL that can receive several parameters and I want to redirect it to another page with these parameters.
The page is wp-login.php
, I have to redirect to the page /login/
. But I need to redirect all the parameters, not just the page.
ex:
http://site.com/wp-login.php?para=ola
http://site.com/login?para=ola
http://site.com/wp-login.php
http://site.com/login
RewriteRule ^/wp-login.php$ /login [QSA,L]
There is an absurd amount of questions about it here on the site, see which helps you best: http://answall.com/search?tab=votes&q=url%20amigavel%20htaccess
– Bacco
The redirect is so internal, want to redirect or rewrite the urls? If you are going to rewrite the way you did, send the GET parameters normally. Explain better what the problem is.
– Guilherme Nascimento
@Guilhermenascimento I would like to redirect, but the login URL has to receive the parameters that were in the other URL... 'Cause if it has parameters, it doesn’t redirect... I have to redirect everything... and send the parameters from one to the other...
– abcd
Look I think maybe you’re confusing the term redirect, we go by parts, you want when access
/wp-login.php
show the content of/login
right?– Guilherme Nascimento
I have the wordpress. The login page is: wp-login.php... I created another page called /login/ , I need to redirect the first one to this... because the way I did above it does not redirect when it has the parameters and does not send the parameters to the other page...
– abcd
@abcd should write this in the question, and another the example you added was not clear, you mixed in the middle of the code, see questions that have high score to see how people write and write better their own, understand as a constructive criticism. I’m answering your question.
– Guilherme Nascimento
@abcd it may be sending yes, the problem may be in your form too.
– Guilherme Nascimento
@Guilhermenascimento I sincerely do not understand, nothing else is working, neither the way I described nor your...
– abcd
As I said and repeat again, two things: Either you didn’t understand the difference of redirecting and rewriting, or the problem is in your form (does the HTML part know?) or else a third, the . htaccess is not in the right place or you are not using Apache, lack much information to determine the cause of your problem.
– Guilherme Nascimento
@Guilhermenascimento There is something in wordpress that is hindering me to accomplish what I wish. The solution was to use functions of wordpress itself.
– abcd