Through .htaccess
you need to make it so that the address would be site.com/category/id $rowcat['name']
How to configure .htaccess so that the url is like site.ru/$rowcat['name']/$row['id']/
?
Through .htaccess
you need to make it so that the address would be site.com/category/id $rowcat['name']
How to configure .htaccess so that the url is like site.ru/$rowcat['name']/$row['id']/
?
For the first time I see an array element in the value of a URL variable. :-) It is difficult for me to understand these constructions. Apparently, some mod_rewrite rules have already been applied.
Maybe now file.php?id=1&cat=2
, for example? Or is file.php?id=1/2
? But do you need it, as I understood at all site.ru/2/1/
or is it still site.ru/2/1
?
Teach how to turn such a simple question into such a difficult one ?! :-)
upd
Add lines to .htaccess
RewriteEngine On RewriteRule ^([0-9]+)/([0-9]+)$ file.php?cat=$1&id=$2 RewriteRule ^([0-9]+)/([0-9]+)/$ file.php?cat=$1&id=$2
Source: https://ru.stackoverflow.com/questions/106404/
All Articles