Awesome q2a theme

How to do a redirect get request on a page on the main except for some pages?

0 like 0 dislike
There is such a structure:
Main (index.php)
- Login page (signin.php)
Sign - up page (signup.php)
- User page (user.php)
- Admin user (admin.php)

It works like this:
The user comes to the home, is authenticated and a session is created (if there is a session then redirects to admin.php)
For each user page user.php takes a get parameter to login. Therefore, if you contact us at the, we see data user1 from database.

I want to convert the complex structure of the in the

In the file .htaccess write the following:

RewriteEngine on
RewriteRule ^(.*)$ user.php?login=$1 [L]

But with this option, entering at the get the error.

If you write:

RewriteEngine on
RewriteRule ^m/(.*)$ user.php?login=$1 [L]

appeal at the everything works as it should.

Question - how to redirect all requests to the ; to exclude the registration page, login and admin? Because if a person contact situp = I understand this will be perceived as сайт.ру/user.php?login=signin.php

Do not like can't deal with it. Can someone please help?
And if you can immediately with the exception of the extension .php in the address bar (which would .php did not show up)
by | 49 views

2 Answers

0 like 0 dislike
0 like 0 dislike
HET is not part of the url and does not go in the rewrite rule.
To highlight, we use a two-tier design
Also all that $1 of Konda it will be %1

# 301 --- =>
RewriteCond %{HTTP_HOST} ^www\\.test\\.com$
If the host such
RewriteCond %{QUERY_STRING} (^|&)faq\\=13($|&)
And if there is a get request so that
RewriteCond %{QUERY_STRING} (^|&)layout\\=bob($|&)
And THERE is such a request, the Exception is !
RewriteCond %{QUERY_STRING} !(^|&)layout\\=bob2($|&)
To implement such a rule
RewriteRule ^faq\\.html$ [L,R=301]

This design is not mandatory(^|&)faq\\=13($|&)
Can be abbreviated to faq\\=13 but the Constitution chose the option Amaranta without it.
Also pay vnimanie at the end of the steering column that has to be the end ? it is in this writing will remove the get parameters is

Related questions

0 like 0 dislike
1 answer
asked May 21, 2019 by neMaster
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 5, 2019 by doorway-team
0 like 0 dislike
3 answers
110,608 questions
257,187 answers
40,796 users