S
S
Suleimanov_Ismar2019-06-23 11:56:31
htaccess
Suleimanov_Ismar, 2019-06-23 11:56:31

How to hide url with htaccess?

Hello,
Can you please tell me how to write a .htaccess code so that you can hide the request in the url get?
Can you just hide it? Because the request itself is needed for php processing.
Main link:
https://сайт.kg/?autotype=legkovye-avto
Need to be removed:
?autotype=legkovye-avto
What I did (I found it on the Internet and redid it a little, but even everything is terrible, I don’t understand how it should work):

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([A-Za-z0-9_])/([^/]*)$ /$1\?autotype=legkovye-avto$2 [L]

</IfModule>

Please, help.
Sincerely)
Ps The request itself is needed for php, there is a recognition of what needs to be displayed on the main

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew Dry, 2019-06-23
@andrewdry7z

Convert to POST request?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question