D
D
DooX2020-08-14 23:49:43
Computer networks
DooX, 2020-08-14 23:49:43

Comrades, how to write a GET request in the Htaccess URL?

Comrades, there is domen.ru/?z=fff
tell me how to register Htaccess.
so that the browser displays domen.ru/fff
while working on index.php and getting fff in $_GET or maybe differently. the main thing is to get fff

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-08-15
@DooX

it's called CNC

Вот один из примеров
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
# если это не файл
RewriteCond %{REQUEST_FILENAME} !-l
# и если это не линка
RewriteCond %{REQUEST_FILENAME} !-d
# и это не директория
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$

# loop protection if this is not a file that wraps the url
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L] #Then
redirect to the file that will process the link, in this case it is not an index

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question