Answer the question
In order to leave comments, you need to log in
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>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question