C
C
Chesterfield252021-02-17 00:01:22
htaccess
Chesterfield25, 2021-02-17 00:01:22

How to properly configure htaccess to create the necessary urls?

At the moment my
.htaccess contains

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?q=$1 [L,QSA]


If I understand correctly, then q=$1 allows you to create such urls site.ru/categories/1
And how to configure it correctly so that I can create a url of this kind site.ru/api/appfaucetlist/categories/1/1
and such site.ru/ api/appfaucetlist/categories/1/1/1
By url /categories/1 I will get one category, by url /categories/1/1 I will get all products of this category, and by url /categories/1/1/1 one product this category

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question