W
W
wolfak2015-09-30 15:41:11
PHP
wolfak, 2015-09-30 15:41:11

Why is the GET request not working?

Good time of the day. There is an authorization page.
Changed her address to a shorter one in .htaccess

RewriteRule ^login$ login.php [L]
RewriteRule ^login\?zapros=+([a-zA-Z0-9]+)$ login.php?zapros=$1 [L]

You need to add a GET request to site.ru/login:
site.ru/login?zapros=123

but for some reason it doesn't work.
This is how it works:
RewriteRule ^login$ login.php [L]
RewriteRule ^login&zapros=+([a-zA-Z0-9]+)$ login.php?zapros=$1 [L]

site.ru/login&zapros=123

But I need it with a question mark. What could be the problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Defman21, 2015-09-30
@wolfak

What's the point?
It is possible that a QSA needs to be added to the RewriteRule, i.e.
RewriteRule ^login$ login.php [L,QSA]

I
Ivanq, 2015-09-30
@Ivanq

Sign ? official. Escape \?

S
ShamblerR, 2015-09-30
@ShamblerR

maybe because GET is not passed, I think it has something to do with it!
Using the standard method, you cannot go to a page with a get parameter
; you can save it and substitute it with a variable
in the
condrull
construct

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question