Answer the question
In order to leave comments, you need to log in
How to write replacement for GET request in htaccess?
Hello, there is a "save" local domain, the script on it accepts a get request, say "q" (save/index.php?q=query), what should be written in .htaccess so that it would be like this 'save/query'?
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_METHOD} GET
RewriteRule ^ index.php [L]
For such things, a php component (url manager) is written, I think the network is full of ready-made solutions and is connected to index.php
You need to read about apache mod_rewrite, here is an excellent article if you want to dive: https://habrahabr.ru/company/sprinthost/blog/129560/
You won't have to change anything as a router on the application side if you don't need to generate "correct" links. The script will work the same for index.php?q=query and just query.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question